473,503 Members | 2,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server to client script

How can I get a server value into client event?

Or is there another way around my problem?

I have a ASP page that need to get the server IP
(Request.ServerVariables("LOCAL_ADDR")) to open a new asp page

this is some of my HTML that I want to work.

<HTML>

<head>

<title></title>

<script for="Meny1" event="OnSettbruk" language=Javascript>

verdi = <%=(Request.ServerVariables("LOCAL_ADDR"))%>;
<--------------------------not working

document.Show.action = "http://"+verdi+"/hpcnet/kalender.asp";

window.status="Brukstid tabell";

document.Show.target="bottomframe";

document.Show.submit();

</script>

Regars Joachim
Nov 23 '06 #1
2 3414
ASM
Joachim Jordan a écrit :
How can I get a server value into client event?

Or is there another way around my problem?

I have a ASP page that need to get the server IP
(Request.ServerVariables("LOCAL_ADDR")) to open a new asp page

this is some of my HTML that I want to work.
And it doesn't work ?
<HTML>
<head>
<title></title>

<script for="Meny1" event="OnSettbruk" language=Javascript>
perhaps more standard ?

<script type="text/Javascript">
verdi = <%=(Request.ServerVariables("LOCAL_ADDR"))%>;
<--------------------------not working
So it's server's problem ... no ?

verdi = "<%=(Request.ServerVariables("SERVER_ADDR"))%> ";

in SSI :

verdi = '<!--#echo var="SERVER_ADDR" -->';
document.Show.action = "http://"+verdi+"/hpcnet/kalender.asp";
document.Show.action = "/hpcnet/kalender.asp";

would have to run to file kalender.asp in folder hpvnet in root.
window.status="Brukstid tabell";

document.Show.target="bottomframe";

document.Show.submit();

</script>

Regars Joachim


--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Contact : http://stephane.moriaux.perso.wanadoo.fr/contact
ASM = Aimable Stéphane Moriaux = Amateur Sasseur Merdouilles
Nov 23 '06 #2
Got it to work now.
Thx for answering my post
The problem was the "" .Somehow I forgot about them ;O)

verdi = "<%=(Request.ServerVariables("LOCAL_ADDR"))%>" ; <-- this works to
get the IP address
"ASM" <st*********************@wanadoo.fr.invalidskrev i melding
news:45**********************@news.orange.fr...
Joachim Jordan a écrit :
>How can I get a server value into client event?

Or is there another way around my problem?

I have a ASP page that need to get the server IP
(Request.ServerVariables("LOCAL_ADDR")) to open a new asp page

this is some of my HTML that I want to work.

And it doesn't work ?
><HTML>
<head>
<title></title>

<script for="Meny1" event="OnSettbruk" language=Javascript>

perhaps more standard ?

<script type="text/Javascript">
>verdi = <%=(Request.ServerVariables("LOCAL_ADDR"))%>;
<--------------------------not working

So it's server's problem ... no ?

verdi = "<%=(Request.ServerVariables("SERVER_ADDR"))%> ";

in SSI :

verdi = '<!--#echo var="SERVER_ADDR" -->';
>document.Show.action = "http://"+verdi+"/hpcnet/kalender.asp";

document.Show.action = "/hpcnet/kalender.asp";

would have to run to file kalender.asp in folder hpvnet in root.
>window.status="Brukstid tabell";

document.Show.target="bottomframe";

document.Show.submit();

</script>

Regars Joachim


--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Contact : http://stephane.moriaux.perso.wanadoo.fr/contact
ASM = Aimable Stéphane Moriaux = Amateur Sasseur Merdouilles

Nov 24 '06 #3

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

Similar topics

9
4316
by: Kathryn | last post by:
Hiya I have a problem with using some client side and server side scripting together in an ASP. I'm using VBScript. What I'm trying to achieve is this - - Page loads up and some server side...
12
12394
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
4
3498
by: Bob T | last post by:
Hi All, I am trying to pass a variable from my VB asp.net script (from for example Sub Page_Load in mypage.aspx.vb) to my Client side script. I have found and looked at a very good example...
4
2445
by: Prodip Saha | last post by:
Dear ASP.NET Gurus, I have a TextBox control with AutoPostBack set to true to execute the server scripts. I also, added some client script for validation.What I want is--execute the client script...
8
3654
by: Mike Fellows | last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is beyond me i have a piece of client side code that requires a piece of data from the server side (an ID number in this...
1
3123
by: Chris | last post by:
Hi, I have jsut started to learn ASP development and have read many articles regarding which is the best to use regarding JavaScript or VBScript. All of the learning that I have done so far has...
5
13102
by: Ankur | last post by:
Hi Folks, I am new for this group. I want to clarify one thing what's a basic difference between Client Side Java Script and Server Side Java Script. how we can differentiate it. Why we called...
2
2133
by: arijitdas | last post by:
Hi, We have an ASP.NET 2.0 web application where we want to share few user specific data between server and client side code using cookie. We are seeing a very strange behavior that it does not...
1
2159
by: captainwin | last post by:
Here's the problem: - Website is ASP.NET 1.0 - Server is Windows Server 2003 - Browser is IE 6/7 - Client requests a mail merged MS Word 97 - 2003 document on the website, and the document gets...
39
5823
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
7204
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
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
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,...
0
4680
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...
0
3171
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...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1516
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 ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.