473,324 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Dynamic Form Generation Fails

I am using ASP to dynamically generate a series of forms. When the
page is loaded, everything appears to be correct, except that the
first form generated fails with a "FormName is Null or not an Object"
error. Each subsuquent form created by the code after that works
perfectly. Why is it that the first form, generated with exactly the
same block of code, fails?

Code Block: See ****** for form generation

Function DisplayExisting()
if not (rsAssay.BOF) then
rsAssay.MoveFirst
strHTML = "</TR>"
strHTML= strHTML + "<TR align='left' valign='middle'>"
strHTML= strHTML + " <TD colspan='8' height='1'
bgcolor='#990000'><IMG src='../../Images/spacer.gif'></TD>"
strHTML= strHTML + "</TR>"
strHTML= strHTML + "<TR valign='middle' align='left'>"
strHTML= strHTML + " <TD height='30' align='center'
class='columntext'>Current Values</TD>"
'Build Row for Values
Count = 1
do while Not rsAssay.EOF
if rsAssay.Fields.Item("replicate").Value = Count then
strHTML= strHTML + " <TD height='30' align='center'
class='columndata'>" & rsAssay.Fields.Item("count").Value & "</TD>"
rsAssay.movenext
else
strHTML= strHTML + " <TD height='30' align='center'
class='columndata'>&nbsp;</TD>"
end if
Count = Count + 1
Loop
strHTML= strHTML + "</TR>"
strHTML= strHTML + "<TR valign='middle' align='left'>"
strHTML= strHTML + " <TD align='center'
class='columntext'>Remove Replicate</TD>"

********************

'Build Row for Deletion
rsAssay.MoveFirst
Count = 1
do while Not rsAssay.EOF
if rsAssay.Fields.Item("replicate").Value = Count then
strHTML= strHTML + " <FORM name='frmDel" & Count & "'
action='birc_data_site_bioassay_1.asp' method='Post'>"
strHTML= strHTML + " <TD align='center' class='columndata'><A
HREF=javascript:window.document.frmDel" & Count & ".submit();><IMG
src='../../Images/x.gif' border='0'></A>"
strHTML= strHTML + " <INPUT name='lstAssay' type='hidden'
value='" & request("lstAssay") & "'>"
strHTML= strHTML + " <INPUT name='intRep' type='hidden'
value='" & Count & "'>"
strHTML= strHTML + " </TD>"
strHTML= strHTML + " </FORM>"
rsAssay.movenext
else
strHTML= strHTML + " <TD align='center'
class='columndata'>&nbsp;</TD>"
end if
Count = Count + 1
Loop
strHTML= strHTML + "</TR>"
strHTML= strHTML + "<TR align='left' valign='middle'>"
strHTML= strHTML + " <TD colspan='8' height='1'
bgcolor='#0000FF'><IMG src='../../Images/spacer.gif'></TD>"
strHTML= strHTML + "</TR>"
DisplayExisting = strHTML
end if
End Function
Jul 20 '05 #1
4 2139
Lee
Tim Pascoe said:

I am using ASP to dynamically generate a series of forms.


Your question doesn't seem to have anything to do with Javascript.

Jul 20 '05 #2
Lee,

Except that the code is using JAVASCRIPT to submit the generated forms.
AND the error I am getting is a JAVASCRIPT error.

Nice.

Doesn't matter, I solved the problem without your volumes of help.

Tim

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
In article <40***********************@news.frii.net>, ti********@cciw.ca
enlightened us with...
Lee,

Except that the code is using JAVASCRIPT to submit the generated forms.
Not from what I could tell of that posted mess of VBScript, it isn't. I
see a form with an action and a method.
Not until I looked really closely inside a bunch of string statements
did I see a link with the dreaded "javascript:" pseudo-protocol in it
and realized that it was supposed to submit the form.
You want people to help, post readable, testable code.
AND the error I am getting is a JAVASCRIPT error.

Nice.

Doesn't matter, I solved the problem without your volumes of help.


And the error was more than likely in the way the form was generated
from the ASP code, since that was what you marked out as relevant. But
we certainly can't tell from all the VBScript.
You make the assumption that people here can even tell what that
VBScript code does. Many do not. I have only a basic understanding of it
myself.

When you have a client-side javascript error, the error is on the
client.
Copy and paste the client code (view source), with no VBScript code, for
people to look at.
TESTABLE code, not stuff we need ASP to even comprehend.

Getting your panties in a knot because someone saw reams of VBScript,
not javascript, is rather silly.

--
--
~kaeli~
Hey, if you got it flaunt it! If you don't stare at someone
who does. Just don't lick the TV screen, it leaves streaks.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #4
tim pascoe wrote:
Lee,

Except that the code is using JAVASCRIPT to submit the generated forms.
AND the error I am getting is a JAVASCRIPT error.

Nice.

Doesn't matter, I solved the problem without your volumes of help.

Tim


You may be under stress but try to not let that influence your writing.

--
Bas Cost Budde
http://www.heuveltop.nl/BasCB

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Griff | last post by:
Hi there I'm after some suggestions as to how one might best separate form and content in a normal run-of-the-mill web application. I'm sure whole bookshelves have been written on this, but I...
7
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the...
0
by: Venus | last post by:
Hello, After trying some ways to do it I wanted to use something like the code below but for some reason is not working (I have to generate the entire form dynamically (not only the controls)):...
0
by: Venus | last post by:
Hello, After trying some ways to do it I wanted to use something like the code below but for some reason is not working (I have to generate the entire form dynamically (not only the controls)):...
3
by: RahimAsif | last post by:
I am writing an application that requires the a portion of the main menu to be dynamic. The menu has file, panels, view files and help across the top. The view files sub menu needs to be...
2
by: Ghada Al-Mashaqbeh via DotNetMonster.com | last post by:
Hi all, I am facing a problem in dynamic code generation at run time, the problem occurs when the dynmaic code use global data exist within the original application. Lets say that my...
0
by: Mark | last post by:
Hello I'm using VS2005 and doing a VB.Net project. Yesterday I changed one of my forms by removing a listview and a couple of buttons (contained in a tab page). These were recreated in a user...
1
by: Peterwkc | last post by:
Hello all expert, i have two program which make me desperate bu after i have noticed the forum, my future is become brightness back. By the way, my problem is like this i the first program was...
5
by: =?Utf-8?B?QUEyZTcyRQ==?= | last post by:
The full error message is "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information." I am getting this error when...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.