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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto increment VALUE attribute extension

Status
Not open for further replies.

Arzo2000

Programmer
Jul 7, 2005
12
CA
I was wondering if there was such an extension or a built in tool for Dreamweaver that searches for all <INPUT> tags of TYPE 'checkbox' and sets a unique value for the VALUE attribute.

Example:

I have 3 checkboxes as follows:
Code:
<INPUT ID="chkOption1" TYPE="checkbox" VALUE="checkbox" /> <INPUT ID="chkOption2" TYPE="checkbox" VALUE="checkbox" /> <INPUT ID="chkOption3" TYPE="checkbox" VALUE="checkbox" />

and I want the end result to change the VALUE attribute as follows:
Code:
<INPUT ID="chkOption1" TYPE="checkbox" VALUE="1" />
<INPUT ID="chkOption2" TYPE="checkbox" VALUE="2" />
<INPUT ID="chkOption3" TYPE="checkbox" VALUE="3" />

Problem is that I have thousands of those checkboxes instead of 3. So I was thinking maybe there is a value incrementing tool available somewhere that someone might know of that parses through all checkboxes or input tags.

I hope that explains it. Thanks in advance guys.
 
nope, but 'Find and Repleace' might cut down some of your time.
All the best!

:--------------------------------------:
fugitive.gif


All around in my home town,
They tryin' to track me down...
 
Thanks for your response.

Personally, I dont think find and replace will do any good since I need to change all values to a unique one. Which means I have to go through each and every checkbox and manually change the value. And since find and replace is mostly used for excpetions, in my case that wont help me much cause all checkboxes need to be changed not only specific ones.

It's pretty strange though. You would think after all this time since Dreamweaver came out that there would be a tool to autoincrement a certain attribute. It might not only help just me, but a lot of other people as well.

Thanks anyway.
Cheers~

 
Arzo2000,
I feel your pain but sorry forms are very static and any dynamic concept of would be best handeled by the database...that way you can controll your values a bit better.
"Which means I have to go through each and every checkbox and manually change the value"

Why are u suprised about this? I mean didn't u create them manually also?
The closes I can come up without DB is to search for "checkbox" VALUE="......then again it is all elbow grease.
All the best!

:--------------------------------------:
fugitive.gif


All around in my home town,
They tryin' to track me down...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top