|
-
Apr 22nd, 2003, 12:28 PM
#1
Thread Starter
Addicted Member
QUERYSTRING not displaying in URL nor setting in PHP from JavaScript [RESOLVED]
I've been using the following code successfully to display two buttons that would browse to either the Manager page or to the History page.
<FORM METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<button type="submit" onClick='JavaScript: form.action="admin/index.php";'>Manager Page</button>
<button type="submit" onClick='JavaScript: form.action="history/index.php";'>History Page</button>
</FORM>
Now I'd like to pass a QUERYSTRING when the Manager button is pressed, "dir=a", but it does not display in the browser URL Address box and certainly is not present in $_GET['dir'] from PHP.
<FORM METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<button type="submit" onClick='JavaScript: form.action="admin/index.php?dir=a";'>Manager Page</button>
<button type="submit" onClick='JavaScript: form.action="history/index.php";'>History Page</button>
</FORM>
I even tried changing onClick to onSubmit with no success.
<FORM METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<button type="submit" onSubmit='JavaScript: form.action="admin/index.php?dir=a";'>Manager Page</button>
<button type="submit" onClick='JavaScript: form.action="history/index.php";'>History Page</button>
</FORM>
Now I just noticed that the ? is appearing (so I assume it was always appearing) in my browser URL Address box appended to index.php like so index.php?, even though I had no querystring. JavaScript is turned on in my browser.
What am I missing? And why would I intermittently see a session id in the URL Address box? I'm not turning cookies on and off.
I might try passing another session variable around instead of the querystring, but I don't see why I should have to.
Last edited by Phenix; Apr 22nd, 2003 at 01:46 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|