473,387 Members | 1,486 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,387 software developers and data experts.

running scrip after the page is rendered.

Ed
Don't know where else to ask this question...AFS people tell me they
can't answer JavaScript questions...it's a little of both with vbscript
mixed in.

I have a series of select statements such as this one that gets it's
options from our database. At the end of the select statment(s) is a
script to create another row of select statements so a person needing
more than one account to process an order can do just that. Problem is I
can't run the sql script again after they click the "Add Account" so I'm
stuck just offering them a text boxes instead of select statements for
each additional Account they want to add...anyone know a way around this?

I need to build a select statment from a sql statement after the page
has been rendered.

sSQL2 = "SELECT DISTINCT Fund" & _
" FROM MasterTableCfoapal2"
set rs2 = Connect2.Execute(sSQL2)

<html>
<head>
function addacc(num) {
var del1 = document.getElementById(num)
var stuff;
var arow = num * (-1);
document.RFO.arow.value=arow;
document.all.AccAmt.style.visibility="visible";
document.all.AccTot.style.visibility="visible";
document.RFO.acc_tot_1.value="Balance";
document.RFO.acc_tot_1.disabled="true";

stuff = "<select name=\"fund_1\" class=\"regSoft\">";
stuff = stuff + "<% Do until rs2.eof %>";
stuff = stuff + "<option><%=rs2(\"Fund\")%></option>";
stuff = stuff + "<% rs2.MoveNext";
stuff = stuff + "Loop %>";
stuff = stuff + "</select>";

num = num - 1;

stuff = stuff + "<div id=\"" + num + "\" style=\"visibilty:visible\">"
stuff = stuff + "<A onClick=\"javascript:addacc(" + num +")\"><u
class=\"regSoft\"><font color=\"blue\">Add Account</font></u></a></div>"
del1.innerHTML = stuff
}
</head>
<body>
<select name="fund_1" class="regSoft">
<% Do until rs2.eof %>
<option><%=rs2("Fund")%></option>
<% rs2.MoveNext
Loop %>
</select>

<div id="-2" style="visibility:visible">
<a onClick=javascript:addacc(-2)><u class="regSoft"><font
color="blue">Add Account</font></u></a> </div>

Jul 20 '05 #1
1 2159
Maybe you can have a look at thread: Frames, windows, functions & onload

Basically allows actions to take place AFTER a page has rendered.

Cheers,
Fermin DCG

Ed wrote:
Don't know where else to ask this question...AFS people tell me they
can't answer JavaScript questions...it's a little of both with vbscript
mixed in.

I have a series of select statements such as this one that gets it's
options from our database. At the end of the select statment(s) is a
script to create another row of select statements so a person needing
more than one account to process an order can do just that. Problem is I
can't run the sql script again after they click the "Add Account" so I'm
stuck just offering them a text boxes instead of select statements for
each additional Account they want to add...anyone know a way around this?

I need to build a select statment from a sql statement after the page
has been rendered.

sSQL2 = "SELECT DISTINCT Fund" & _
" FROM MasterTableCfoapal2"
set rs2 = Connect2.Execute(sSQL2)

<html>
<head>
function addacc(num) {
var del1 = document.getElementById(num)
var stuff;
var arow = num * (-1);
document.RFO.arow.value=arow;
document.all.AccAmt.style.visibility="visible";
document.all.AccTot.style.visibility="visible";
document.RFO.acc_tot_1.value="Balance";
document.RFO.acc_tot_1.disabled="true";

stuff = "<select name=\"fund_1\" class=\"regSoft\">";
stuff = stuff + "<% Do until rs2.eof %>";
stuff = stuff + "<option><%=rs2(\"Fund\")%></option>";
stuff = stuff + "<% rs2.MoveNext";
stuff = stuff + "Loop %>";
stuff = stuff + "</select>";

num = num - 1;

stuff = stuff + "<div id=\"" + num + "\" style=\"visibilty:visible\">"
stuff = stuff + "<A onClick=\"javascript:addacc(" + num +")\"><u
class=\"regSoft\"><font color=\"blue\">Add Account</font></u></a></div>"
del1.innerHTML = stuff
}
</head>
<body>
<select name="fund_1" class="regSoft">
<% Do until rs2.eof %>
<option><%=rs2("Fund")%></option>
<% rs2.MoveNext
Loop %>
</select>

<div id="-2" style="visibility:visible">
<a onClick=javascript:addacc(-2)><u class="regSoft"><font
color="blue">Add Account</font></u></a> </div>


Jul 20 '05 #2

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

Similar topics

3
by: usenet | last post by:
Hi All, I have some initialization to be done at page load time, which changes the text of some anchors so that they are consistent with the query string (these anchors are used as criteria...
8
by: Kathy Burke | last post by:
Hi. Yet another question. We're running a new asp.net app off a production network server. The PC is a PentiumII/III with 128MB of RAM. When running the app, the memory uses read at about...
2
by: Stephen Miller | last post by:
I have an ASPX report and I want to capture the rendered HTML and write to a file on the webserver. Several posts suggest using WebRequest to make a second call to the page, and screen-scrape the...
8
by: TS | last post by:
Hi, i have inherited a page from another user. The page is the target frame in a frameset. for some reason the whole page runs twice (page_load, init, etc. all run twice) I can't figure out how...
2
by: Ken Cox - Microsoft MVP | last post by:
I'm trying to find a way to program in ASP.NET 2.0 but capture the HTML output. I found the following routine in ASP.NET 2.0 Cookbook from O'Reilly. It doesn't work if I include a server-side...
2
by: akantrowitz | last post by:
I have a asp.net 2.0 page that runs a large DB query on the Page_Load event. This is needed because it generates an array of pictures that are then dumped out onto the webpage. Is there any way...
14
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So,...
1
by: Itzik | last post by:
The simple situation that works: A form (ASP 2.0 Page) with Page.MaintainScrollPositionOnPostBack set to True as well as Page.EnableViewState defaults to True. As the form's data are submitted to...
4
by: TS | last post by:
Steven, i lost this message conversation from outlook express and made a post online (see last one on this page). Please answer it as it hasn't been yet. thanks The clientID of our controls...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.