473,406 Members | 2,713 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,406 software developers and data experts.

Loading another page within via onClick

Bik
I'm building a list of customer orders via ASP/VBscript. e.g:
51 John Doe $1,201.50
52 Jane Smith $ 500.00
53 Jim Miller $1,250.25

I want order numbers 51, 52, 53 hyperlinked to a function which then
makes a Stored Procedure call to SQL Server, and then loads another
page within the current page. So that my main.asp page still remains,
even though the order number displaying page order.asp is executed.

All SQL stored procedures are run using VBScript, but I never done this
using Javascript. In the past, I'd do an #include, but since I don't
know which order number one my click, I have to get the order number
based on onClick event.

How can I achieve this?

Jul 23 '05 #1
4 1893
"Bik" <bi*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'm building a list of customer orders via ASP/VBscript. e.g:
51 John Doe $1,201.50
52 Jane Smith $ 500.00
53 Jim Miller $1,250.25

I want order numbers 51, 52, 53 hyperlinked to a function which then
makes a Stored Procedure call to SQL Server, and then loads another
page within the current page. So that my main.asp page still remains,
even though the order number displaying page order.asp is executed.

All SQL stored procedures are run using VBScript, but I never done this
using Javascript. In the past, I'd do an #include, but since I don't
know which order number one my click, I have to get the order number
based on onClick event.

How can I achieve this?


Perhaps an iframe?

http://www.w3schools.com/tags/tag_iframe.asp

The iframe element creates an inline frame that contains another document.

Jul 23 '05 #2
Bik
Good to know about iFrame, I did not know, it's a cool feature.
However, 2 things i find may cause an issue with me.

1. Before opening an iFrame, I need to sent a control to a routine
that is run on the server to get data from SQL Server using a stored
proc, hence, I need a way to execute a stored proc. And then only run
the iFrame

2. Suppose I do get information from SQL server, I don't want to pass
it as QueryStrings within iFrame. Someone can lookup the source, and
figure out QueryStrings, and may compromise the security of my
database, another words, someone may snoop live data.

Jul 23 '05 #3
Only a half-witted would-be snooper would be stymied just by avoiding
querystrings. Whatever method you use will expose pretty much the
same information on the client page. It's dead simple to view the
source and see field names whether you're using GET or POST. If data
needs to be secure then it should be password-protected. If this is
done and it's still possible to see data you shouldn't be seeing then
you should re-think your approach.

Why do you need to run a stored procedure before populating the
iframe? Are you looking up information you need to create the iframe
content? - you could just include that in the script generating the
order details....

Tim.

"Bik" <bi*****@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Good to know about iFrame, I did not know, it's a cool feature.
However, 2 things i find may cause an issue with me.

1. Before opening an iFrame, I need to sent a control to a routine
that is run on the server to get data from SQL Server using a stored
proc, hence, I need a way to execute a stored proc. And then only
run
the iFrame

2. Suppose I do get information from SQL server, I don't want to
pass
it as QueryStrings within iFrame. Someone can lookup the source,
and
figure out QueryStrings, and may compromise the security of my
database, another words, someone may snoop live data.

Jul 23 '05 #4
Bik
I agree with you. I think I am going to re-evaluate my approach,
storing login session state, so that even someone does go into the
history and pull out the url with QueryString, at least session will
determine that this person has not yet logged in, hence provide login
page.

Secondly, yes, I am looking up information particular to an item which
is hyperlinked. I supply one piece of information, then populate 4 or
5 Session variables, then my #Include file use these session vars to
display.
e.g. suppose hyperlinked item is Order #, say 1020. Once you click on
the hyperlink, supposed to in theory take the Order No supply it to a
VBScript runs Store Proc on the server, and pulls out information and
populates Session Variables with, say CustomerID=153, ShippingID=44,
and couple of more. The the control flows to #include file=xxx.asp to
render it

Jul 23 '05 #5

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

Similar topics

10
by: John Ortt | last post by:
Hi Everyone, I have created a Javascript menu for my site which uses frames. The first stage loads fine but I want two drill down menus ("About Me Menu" and "Projects Menu"). The pages load...
1
by: ebrandmark | last post by:
I am trying to load a SCRIPT SRC tag that will result in a document.write into a specific location in my web page but not call for the SCRIPT SRC until the end of the page (so as not to delay the...
3
by: Seth Broomer | last post by:
Hi, i have a .aspx Page, inside that page is a web user control. The user control is basically a login control. if the user is logged in the page shows one thing. if the user isn't logged in...
17
by: CES | last post by:
All, I was wondering if their is a way of loading an external script fill from within a script?? <script language="javascript" type="text/javascript"> function test(var){ <script...
1
by: Vlad | last post by:
Greetings: Here is scenario I hope to get help with. ASP.NET 1.1 page: page_load(){ ... btnSave.Attributes.Add("onclick", "MyClick()"); }
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
21
nathj
by: nathj | last post by:
Hi, I am currently working on a new site that offers various files for download. The file information is stored in a MySQL database and the page is produced in PHP depending on how the user got...
6
by: Jeremy | last post by:
I've got a floating div which becomes visible when a link is clicked. I want the div to be hidden when the user clicks anywhere on the page except for whithin the div. What is the best way to do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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...
0
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,...

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.