Current time: 10-21-2019, 08:12 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Javascript document.form.submit() not working with Firefox 4.0
04-04-2011, 07:57 PM
Post: #1
Javascript document.form.submit() not working with Firefox 4.0
Hi

I'm trying to submit a form with javascript. Works fine with Firefox 3.6, but in Firefox4.0 and IE8 doest work fine.

Code:
<table>
<tr>
<td>
<form action='results.html' method='post' target='_blank' id='<% $question->{ QuestionID } %>'>
<input type='hidden' name='SurveyID' value='<% $surveyid %>'
<input type='hidden' name='responses' value='<% join ",", map { $_->{ srid } } @textresults %>' />
<input type='hidden' name='question' value='<% $question->{ QuestionID } %>' />
Total Responses: (<a href='j submitForm("<% $question->{ QuestionID } %>");'>View All</a>)
</form>
</td>
</tr>
</table>

J

<script type='text/javascript'>
function submitForm(id) {
document.getElementById(id).submit();
}
</script>

Any Idea???

Thanks ahead for any help;
Sathyan
Find all posts by this user
Quote this message in a reply
04-05-2011, 07:35 AM
Post: #2
RE: Javascript document.form.submit() not working with Firefox 4.0
You may get some help here by random luck because there are a lot of web developers but generaly the discussions here are focused on web performance, not general programming. You might have better luck over at stackoverflow.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-05-2011, 06:35 PM
Post: #3
RE: Javascript document.form.submit() not working with Firefox 4.0
Thanks for the valuable information.
Find all posts by this user
Quote this message in a reply
04-06-2011, 09:08 PM
Post: #4
RE: Javascript document.form.submit() not working with Firefox 4.0
(04-05-2011 06:35 PM)sathyanpry Wrote:  Thanks for the valuable information.

try using this

document.forms[form].submit();
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)