[thelist] [javascript] passing vars in url to window.open

Paul Bennett paul at teltest.com
Thu Oct 17 17:05:01 CDT 2002

OK this is driving me nuts this morning:
I have a js function:

function viewNote(url)

screenX=500,screenY=200,status=no,scrollbars=auto, resize=no");

which is called from  a link in this fashion:
<a href="#" onclick="viewNote('view_note.php\?note_id=<? echo
$obj_update_account->id ?>'); return false;">view note</a>
Pretty straightforward i would think?
BUT I get a 404 when the new window is opened (the 404 is in the child,
not the parent window). I have tried it with and without the escaped ?,
and also by hardcoding the url into the function. Hardcoding it in
works, but passing the exact same string from the link gets the 404 error.
(As you may guess, the note_id changes from row to row in the table and
the view_note.php page displays the note with the row_id set in note_id)

Paul Bennett
Internet Developer
Teltest Electronic Design
Phone : 64 4 237 0767
Web : http://www.teltest.com
Wap : http://wap.teltest.com
Email : paul at teltest.com

More information about the thelist mailing list