Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-19-2005, 11:52 AM   #1 (permalink)
SeetaramaRaju
Registered User
 
Join Date: Aug 2005
Posts: 8
SeetaramaRaju is on a distinguished road
sending parameter in a link

i've a req where i need to enter a value in an input box and then send it as a parameter to the link. but it is not taking it. the following is the code iam using

the following is th code bit
Code:
<body>
  <form  action="/code.do" name="code">
    <table>
    <tr>
    <TD>REGION</TD>
    <TD>
    <input type="text"  name="Region">
    <a href="fipses.do?code=document.code.Region.value&event=Report" onClick="returnParam()">Report</a></TD>
    </tr>
    </table>
  </form>
</body>
my idea is to take 'document.code.Region.value' as parameter. But it is taking
the whole name itself instead of value.

How to accomplish this. Help please

Last edited by redhead; 08-19-2005 at 01:12 PM.
SeetaramaRaju is offline   Reply With Quote
Old 08-19-2005, 01:16 PM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
How about somethign like this:
Code:
<body>
  <form  action="/code.do" method="get">
    <table>
    <tr>
    <TD>REGION</TD>
    <TD>
    <input type="text"  name="code" value="">
    <input type="hidden" name="event" value="Report">
    <input type="submit" name="Report" value="Report"></TD>
    </tr>
    </table>
  </form>
</body>
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 08-19-2005, 01:21 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,530
sde is on a distinguished road
or if you wanted to still do it with a link you could use something like this:
HTML Code:
<input id="Region"> <br> <a href="javascript:window.location='test.html?code='+document.getElementById('Region').value+'&event=Report';">Report</a>
:: edit ::
note that the code parser broke up the word document .. so you will have to take the spaces out.
__________________
Mike
sde is offline   Reply With Quote
Old 08-19-2005, 01:28 PM   #4 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Quote:
note that the code parser broke up the word document .. so you will have to take the spaces out.
I've noticed that too.. I don't know if it has something todo with linelength of the parsed code-segments, since I've noticed the index where the spaces appear is controlled by the remaining length of the parsed line, calculated from the added <double> space.

Jus a thought I encountered in a thread I once answered to.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 08-19-2005, 02:02 PM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,530
sde is on a distinguished road
i think vbulletin just breaks it up to prevent javascript embedding.. i could be wrong.
__________________
Mike
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy a directory link with -Rs sde Linux / BSD / OS X 3 02-15-2005 06:34 PM
Post Hide Link jdm PHP 10 02-12-2005 08:05 AM
I am a newb, how do you set multiple parts of an image as a link? I sniper baby HTML, XML, Javascript, AJAX 5 02-10-2003 07:40 PM


All times are GMT -8. The time now is 03:41 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting