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

Dynamically Change Variable names

Hello Everyone,

I have a javascript file, which has some variables set. I wanted to change the existing variable names dynamically.

For example, In my file i have my variable prefix as S_ (S Underscore) and i need to change it as S. (S dot). Can some one help me?

Thanks in advance
Aug 6 '07 #1
3 1554
iam_clint
1,208 Expert 1GB
ctrl + r for replace functionality in most text editors.
Aug 6 '07 #2
Thank you for the help. But i might not have made myself clear about the concept. We are actually migrating from one version to another. Say from A Version to B Version.

A Version variables are named as S_somename etc while B version variables are named S.Somename. I am told that there should be an include file in the site which has variables dynamically populated on different pages. so i am supposed to change all variable instances from S_ to S.

I hope i am clear now. So, how am i supposed to do this?

Thanks
Aug 6 '07 #3
acoder
16,027 Expert Mod 8TB
Thank you for the help. But i might not have made myself clear about the concept. We are actually migrating from one version to another. Say from A Version to B Version.

A Version variables are named as S_somename etc while B version variables are named S.Somename. I am told that there should be an include file in the site which has variables dynamically populated on different pages. so i am supposed to change all variable instances from S_ to S.

I hope i am clear now. So, how am i supposed to do this?

Thanks
Can you not change version B? If you have "S.", it's now an S object followed by a property or method while "S_" would still be the variable name. They are not the same thing because "." has a special meaning.
Aug 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Terry | last post by:
I have a number of input boxes used to display totals based on selected items for each row in a table. There are more than a few rows that are identical, except for the form field name. I have...
4
by: Eric | last post by:
How can I dynamically assign an event to an element? I have tried : (myelement is a text input) document.getElementById('myelement').onKeyUp = "myfnc(param1,param2,param3)"; ...
8
by: Falc2199 | last post by:
Hi, Does anyone know how to make this work? var sectionId = 5; repeat_section_sectionId(); function repeat_section_5(){ alert("firing"); }
7
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.