rhyspaterson Posted November 28, 2007 Share Posted November 28, 2007 Hey guys, After a very long and arduous chat with the developers of one of our products, i basically need to know is there a PHP (or other) version of: <body onload="document.myform.submit()"> Apparently curl can help out here but i have no idea - especially seeing as PHP is a server side language which confuses things a bit. Are there other client side languages out there that could help..? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 28, 2007 Share Posted November 28, 2007 No, you can't do anything client side with PHP. I would suggest looking into AJAX or JavaScript. Quote Link to comment Share on other sites More sharing options...
rhyspaterson Posted November 28, 2007 Author Share Posted November 28, 2007 Ok thanks. I can't use JavaScript as i'm trying to build this script to degrade gracefully when JavaScript is disabled. Is there no other way to submit the form? Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 28, 2007 Share Posted November 28, 2007 use header..file and session to act like onload.. use header file and use querystring use button submit Quote Link to comment Share on other sites More sharing options...
rhyspaterson Posted November 28, 2007 Author Share Posted November 28, 2007 Can't use a button as it has to be automatic Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 28, 2007 Share Posted November 28, 2007 what are you exactly trying to do cause that looks to be a pointless script Quote Link to comment Share on other sites More sharing options...
rhyspaterson Posted November 28, 2007 Author Share Posted November 28, 2007 what are you exactly trying to do cause that looks to be a pointless script Well no, it's not. It's integrated with our security, therefore it is a different case than normal. All i said was i needed a way to automatically submit a form and have it degrade nicely if JS is disabled. Does that sound pointless to you? Because it doesn't to me. Doing something different doesn't make it pointless. I'm not building a crappy little web page here, it's a tiny part of huge piece of security software. But thanks for the reply. On a happier note, meta refresh can help me out here. <meta http-equiv="refresh" content="0;url=http://x.x.x.x/example.html?VAR1=variable?VAR2=variable?VAR2=variable" /> Can pass the variables through the URL and redirect to the page i need to go Thanks all Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 28, 2007 Share Posted November 28, 2007 If you refresh the form on the page loading you loaded the page for no reason and thus shoudl be able to divert it all with server side, as for security, that is a joke what you doing as server side be 100x more secure Quote Link to comment Share on other sites More sharing options...
rhyspaterson Posted November 28, 2007 Author Share Posted November 28, 2007 No, the page was loaded for a reason. It is where all the variables are generated. They are then sent to a specific page depending on where the user wants them to go (many different scenarios). So the refresh is necessary, yes. But thanks Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 28, 2007 Share Posted November 28, 2007 well if you need to use a script activated by the user to load variables why put them in a form and then reprocess them, why not just process there in php and then modify the headers all in one action no form/page required. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.