Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP & Javascript

Status
Not open for further replies.

andyrne

Technical User
Feb 15, 2001
43
GB
I've an asp page which reads a db and comes up with four fields. In the same page I've a javascript block which needs to read these fields: any idea how I could accomplish this?
 
if asking about how to read form fields then you may need to post in javascript forum
 
Hi andyrne.

What exactly are you trying to do? Please keep in mind, that VBScript is Server side and Javascript is Client-Side. So the Javascript will execute on the client side.
Are you sure you need Javascript?
If yes and if client side is fully wanted: Perhaps you could also implement the Javascript code via
"Response.write("<script language=Javascript>...")
into your ASP-Script? This way you could directly assign the database values rather than form fields.

Hope this helps,
Andy

[blue]An eye for an eye only ends up making the whole world blind. - "Mahatma" Mohandas K. Gandhi[/blue]
 
already answered in Javascript forum (thread216-1042345). In future - please mention if you post in multiple forums to avoid people wasting time on problems that have already been solved.

Tony
[red]_________________________________________________________________[/red]
Webmaster -
 
Ah yeah! Thanks Tony.
Just what I thought of. [tongue]

[blue]An eye for an eye only ends up making the whole world blind. - "Mahatma" Mohandas K. Gandhi[/blue]
 
Yes, someone offered something in the javascript forum: unfortunatley it didn.t work.
I'm sure I mentioned in the javascript one that I'd already put something elsewhere??
oh well, whatever

makeitso: already tried "Response.write("<script language=Javascript>...") , but , even in response.writes, the <script></script> tags make the rest of the code come up with errors.
 
I guess I don't understand the question if the answer provided by BillyRayPreachersSon in the other forum didn't help.

ASP is used to programmatically build a response to the browser's request.

The output of the ASP includes the HTML and Client-Side script that the browser program will use to present a page to the user.

So while you can use ASP to customize the script that is sent to the browser, the ASP executes independantly from the client script.
 
Andyrne.

Ever thought that the error might be within your javascript?

[blue]An eye for an eye only ends up making the whole world blind. - "Mahatma" Mohandas K. Gandhi[/blue]
 
Oh, P.S:
We seldom carry a crystal ball around, so why don't you post some code snippet. Might help us a lot in helping you locate the error...
;-)

[blue]An eye for an eye only ends up making the whole world blind. - "Mahatma" Mohandas K. Gandhi[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top