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

change variable via browser

hello

i've problem.

here is sample code:

<SCRIPT LANGUAGE="JavaScript">
<!--
//var city = NewYork;

function check(form,city)
{
blabla
}

is that possible to change this variable (city) to other ?
i've no access to target page and i need to execute this code on this page
with another variable
Jul 23 '05 #1
1 2178
Ivo
"kuba" wrote
i've problem.

here is sample code:

<SCRIPT LANGUAGE="JavaScript">
<!--
//var city = NewYork;

function check(form,city)
{
blabla
}

is that possible to change this variable (city) to other ?
i've no access to target page and i need to execute this code on this page
with another variable


If you type in the addressbar:

javascript:var city="London"; void("");

the variable will be changed. The void() thing is necessary bacause this
code will return a value (the value of the assignment) and we must prevent
the browser from "navigating" to display this return value as that would
mean we leave the page.
If you type

javascript:check(form,"London"); void("");

the function will run on your command, not because of an event in the page.
HTH
Ivo
Jul 23 '05 #2

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

Similar topics

12
by: Bill | last post by:
For my personal use I am accessing a railway timetable page, parsing its contents and then sending brief relevant information as the subject line of an email to be read on a mobile phone. The...
10
by: TheKeith | last post by:
I don't know much about javascript, so take it easy on me. Is there a way to dynamically change a CSS layers dimensions on the fly. Here is what I'm doing. I have a bunch of thumbnails that when...
27
by: Joseph Shoe | last post by:
How do you change the ASPSessionID during a web session? I have an ASP application in SSL. The first screen is a login screen, which requests user id and password. An ASPSessionID is assigned...
4
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an...
0
by: Anonieko Ramos | last post by:
Answer. Use IHttpHandler. thanks Ro ry for coming up with this code. It processes css file to add variables. neat idea using System; using System.IO; using System.Text; using...
3
by: Mortar | last post by:
i would like to know if there is a way to change the address in the browser, without actually changing to it or submitting. i.e. after a page loads that has a querystring, i want to get rid of...
37
by: sam44 | last post by:
Hi, At startup the user log on and chooses the name of a client from a dropdownlist, which then changes dynamically the connection string (the name of the client indicates which database to use)....
5
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the text in the url/location bar?...
5
by: Rainmanjam | last post by:
I have a web site that uses MSN Live Maps. It works in Opera if I change the User Agent to IE. Is there a way to change the User Agent via Javascript for one page?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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.