Forum Moderators: open

Message Too Old, No Replies

parent and location.href with variables

         

victormazur

5:34 pm on Mar 1, 2004 (gmt 0)



Hi,

I have small problem with my script. I'm considering why my script doesn't work if i add variables and href into the url address...i.e:
function FunctionName(variable) {
...
parent.something.location.href='file.php?variable=' + variable + '#href';
}
belive me it doesn't work... but if there is no:
... + '#href';
it works properly. Can anyone help me or give me some advice? Thank you! Have a nice day!

Regards,
Victor

DrDoc

5:50 pm on Mar 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

I assume the #href part is a bookmark, not a variable value to be passed in the query string? If so, you need to do this instead:

parent.something.location.href='file.php#href?variable=' + variable;

First the page URL, then a bookmark, then a query string... :)