Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Hyperlink

Status
Not open for further replies.

dbuuch

IS-IT--Management
Dec 15, 2003
17
US
Hi, I am trying to put a hyperlink on my website to take me to a particular forum page but cannot get the link to work correctly. i sense I need to escape some characters but have tried all combination and cannot get the link to work.

The ff is the code:
Code:
document.write('</td></tr><tr></form><form action="[URL unfurl="true"]http://www.oldvandals.com/phpBB2/viewforum.php\?f=10"><td>');[/URL]
document.write('<input type="submit" value="Tollie Special" onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');

When I click on the link on my site, it only only displays on the address line but not the last remaining text - f=10 in the address line.

Can anyone help please?

Thanks,
D

"To educate a man is to educate an individual; to educate a woman is to educate a nation"
Dr. Aggrey, Ghana.
 
[1] That's not an escape problem. It is the mechanics of the form submit proper. Taking out the superficial complication due to table's tags, to submit f=10, you can do this.
[tt]
document.open(); //better have this; Without? sometimes can get away.
//etc etc...
document.write ('<form [green]name="x" method="get" [/green]action=" />');
document.write('<input type="hidden" name="f" value="10" /><br />');
document.write('<input type="submit" value="Tollie Special" onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');
//etc etc
document.close(); //better have this; Without? sometimes can get away.
[/tt]
[2] The line you have in mind or have seen works outside the form. Like, say, for an anchor.
[tt]
document.write ('<a href=" Special</a><br />");
[/tt]
 
Thanks Tsuji for coming to my aid. Option 2 works alright but it is out of sync with the other links that appear on the menu. It shows itself as an odd one out even though the hyperlink takes me to where i want to be.

Option 1, however, doesn't quite take me to where I wanted to be - it somehow ignores the .../viewforum.php?f=10 and instead takes me to .../index.php?f=10 which is just the .../index.php page.

"To educate a man is to educate an individual; to educate a woman is to educate a nation"
Dr. Aggrey, Ghana.
 
>Option 1, however, doesn't quite take me to where I wanted to be - it somehow ignores the .../viewforum.php?f=10 and instead takes me to .../index.php?f=10 which is just the .../index.php page.
Then, you have to ask why the page being redirected. It does that not without a reason and it is done server-side. Hence, I would say you've to look at the php page why it does that?
 
You must have some place where the action is changed then. Look for a line that says "document.formname.action='index.php';", or something along those lines.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top