473,811 Members | 3,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 MasterTableCfoa pal2"
set rs2 = Connect2.Execut e(sSQL2)

<html>
<head>
function addacc(num) {
var del1 = document.getEle mentById(num)
var stuff;
var arow = num * (-1);
document.RFO.ar ow.value=arow;
document.all.Ac cAmt.style.visi bility="visible ";
document.all.Ac cTot.style.visi bility="visible ";
document.RFO.ac c_tot_1.value=" Balance";
document.RFO.ac c_tot_1.disable d="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=\"visibil ty:visible\">"
stuff = stuff + "<A onClick=\"javas cript: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="visibili ty:visible">
<a onClick=javascr ipt:addacc(-2)><u class="regSoft" ><font
color="blue">Ad d Account</font></u></a> </div>

Jul 20 '05 #1
1 2177
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 MasterTableCfoa pal2"
set rs2 = Connect2.Execut e(sSQL2)

<html>
<head>
function addacc(num) {
var del1 = document.getEle mentById(num)
var stuff;
var arow = num * (-1);
document.RFO.ar ow.value=arow;
document.all.Ac cAmt.style.visi bility="visible ";
document.all.Ac cTot.style.visi bility="visible ";
document.RFO.ac c_tot_1.value=" Balance";
document.RFO.ac c_tot_1.disable d="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=\"visibil ty:visible\">"
stuff = stuff + "<A onClick=\"javas cript: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="visibili ty:visible">
<a onClick=javascr ipt:addacc(-2)><u class="regSoft" ><font
color="blue">Ad d 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
3859
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 selectors, and should be initialized to the criteria contained within the url). IE and Safari fire the onload event before rendering any elements, so when the event handler synchronizes the anchors, they are rendered with the right contents...
8
1466
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 190MB. Just looking for some opinions. The app is not that complicated. Runs on our internet. Some SQL db used and HTML docs are rendered using XmlTransform class.
2
3972
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 resulting HTML. The technique typically described is: '-- Get the current URL and request page Dim url As String = System.Web.HttpContext.Current.Request.Url.AbsoluteUri Dim req As System.Net.WebRequest = System.Net.WebRequest.Create(url)
8
2766
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 this is happening. there are no transfers or redirects that are occurring in the pages. the page runs thru all of its events then starts all over again. Trying to inspect the stack track doesn't help because when i get to the init the 2nd time,...
2
1730
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 dropdownlist control on the page. The error is RegisterForEventValidation can only be called during Render(); Any ideas? Ken Microsoft MVP
2
5126
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 to display progress to the user while this query is running? This seems like a catch 22 because the page hasn't rendered yet until after the Page_Load finished but i am running a long running task that is required to be complete prior to page...
14
23176
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, we're looking for a way to display the page with a "please wait..." message while the process is running, and then, when the process is done, update the page with the actual results/page content. We have a page that opens another browser/page...
1
1788
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 server and page is rendered back, the form data as well as the page scroll positions are maintained. This is OK! The complicated situation: After the form's data are submitted to server the page (let's call it X) is rendered back as usual, except...
4
2701
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 have become very long since we have 2 master pages that our pages inherit from. Some team members at
0
9724
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.