|
-
Aug 9th, 2000, 09:46 AM
#1
Thread Starter
Fanatic Member
is there a way via java script to force a form to be posted back to the server...
document.FormData.submit
thanks
kurt
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 9th, 2000, 10:31 AM
#2
The webpage must have an "onunload" event (or something similar) that fires when the window is closed or another page is loaded. Can't you use that?
I assume it would be something like:
Code:
<body onunload="javascript:somefunction()">
The only reason I know this event must exist is because alot of Warez sites doit. You know...when you close one crap popup window another 5 appear?
-
Aug 9th, 2000, 12:37 PM
#3
Thread Starter
Fanatic Member
thats now what I am trying to do...
lets say we have a form on a page that is waiting for a user to click submit. Well lets say his mouse moves over a picture (that is not part of the form) I want the submit button to automatically get clicked
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 9th, 2000, 03:54 PM
#4
Addicted Member
Yeah, that's what I was recommending to him as well, except it's document.form1.submit1.click
Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
-ShardsOfSilence.net- ^ My name in ASCII ^
You forget something new every day
| WinME | VB6 Pro | MSC++ | Lambda MOO |
-
Aug 9th, 2000, 06:17 PM
#5
Stop bitchin about wether it's formname.submit or formname.submitbutton.click...
I've had both of them working although I feel that you may as well use the one that requires the least coding.
A lazy programmer is a good programmer.
Here's a WORKING example:
Code:
<html>
<head>
<title>MRHP: Open Diary Loader</title>
</head>
<body onload="javascript:loginform.submit()" bgcolor="#FFFFFF" text="#000000" link="#800080" vlink="#008000" alink="#FFFF00">
<form name="loginform" action="http://www.opendiary.com/express.asp" method="post">
<input type="hidden" name="logstring" value="... dreams ...">
<input type="hidden" name="logpw" value="*******">
<input type="hidden" name="localpage" value="/entrylist.asp?authorcode=A182232">
</form>
<font face="Arial, Helvetica, sans-serif">
Open Diary is loading...please wait.
</font>
</body>
</html>
Usually you wouldn't make all the <input> tags hidden tho.
-
Aug 9th, 2000, 06:47 PM
#6
Addicted Member
Heh, good point, I just didn't know if the way he had come up with worked and I'm at work so I didn't really want to spend the time to test it .
Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
-ShardsOfSilence.net- ^ My name in ASCII ^
You forget something new every day
| WinME | VB6 Pro | MSC++ | Lambda MOO |
-
Aug 10th, 2000, 05:45 AM
#7
Thread Starter
Fanatic Member
Kurt Simons
[I know I'm a hack but my clients don't!]
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
|