[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

automatic form submit with on body load

Posted on 2009-05-18
4
Medium Priority
?
444 Views
Last Modified: 2012-05-07
I need some javascript code that submits my form automatic  WITHOUT using "on body load" as i dont have access to that part of the page.

many thanks
<iframe name="3dseucre" id="frame1" src="#Response.ACSURL#" width="100%" height="500" style="border:0;"></iframe>
<form name="form" method="POST" action="#Response.ACSURL#" target="3dseucre"/>
      <input type="hidden" name="PaReq" value="#Response.PaReq#"/>
      <input type="hidden" name="TermUrl" value="https://#CGI.HTTP_HOST#/bookings/response.cfm"/>
      <input type="hidden" name="MD" value="#Response.MD#"/>
         <input type="submit" value="Go"/>
</form>

Open in new window

0
Comment
Question by:pigmentarts
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
bored321 earned 1000 total points
ID: 24413888
Hmm, Maybe try adding this below the form tag.
<script type="text/javascript">
<!--
function sendform() {
document.form.submit();
}
window.onload = sendform; 
// -->
</script>

Open in new window

0
 
LVL 41

Assisted Solution

by:HonorGod
HonorGod earned 1000 total points
ID: 24413909
Can you add script tags?

e.g., this is equivalent:

<script type='text/javascript'>
  window.onload = function() {
    document.myform.submit()
  }
</script>
0
 
LVL 12

Author Comment

by:pigmentarts
ID: 24414095
yes script tags should be ok thanks I will try these
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24421939
Thanks for the assist and the points.

Good luck & have a great day.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question