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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

'next' button gives error

hi

i do

<form method='post' action='searchsectionb.asp' name='input_form'>
<input type='hidden' name='form_ID' value='195'>
<input type='hidden' name='lRACID' value='59296'>
<input type='hidden' name='irn' value=''>
<input type='hidden' name='approvedpersonname' value=''>
<input type='hidden' name='dob' value=''>
<input type='hidden' name='orderby' value='1'>
<input type='hidden' name='pagenum' value='1'>

<tr><td align='left' width='30%'>

<table width='100%' border='0' cellspacing='0' cellpadding='0' class='bodytext'>
<tr>
<td width='50%'>&nbsp;</td>
<td width='50%'><a href="#" onClick="document.input_form.pagenum.value='2';document.input_form.submit();return false;">Next >></a> </td>
</tr>
</table>

</td></form>

and get

document.input_form.pagenum is null or not an object

any ideas?
thanks
AM
0
amoran
Asked:
amoran
1 Solution
 
German_RummCommented:
Hi amoran,

try without document, like this - onclick="input_form.pagenum.value = '2';...
You get this error in IE, right?

Cheers!
0
 
archrajanCommented:
It does not give error for me...

unless pagenum field is there it will not give u that kind of an error

try this:
<a href="#" onClick="if(document.input_form.pagenum)document.input_form.pagenum.value='2';document.input_form.submit();return false;">
0
 
str_kaniCommented:
I guess you are using a buggy IE,
 try updating your IE
or
try it from another machine or browser.

I am not getting any error message.

0
 
SnowFlakeCommented:
whene referencing objects on the page via in the format
document.input_form
they should have an id property.

you form and inputs have their names set without their id's

so either
1) add  the id <form method='post' action='searchsectionb.asp' name='input_form' id='input_form'>
    and <input type='hidden' name='pagenum' id='pagenum' value='1'>

or
2) use the forms collection syntax:
><a href="#" onClick="document.forms['input_form'].elements['pagenum'].value='2';document.input_form.submit();return false;">  

SnowFlake
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now