So basically this is what I want to do:
I have a php variable called $dynamicchange which gets a different value based on different user selections (which page they’re on etc.)
I also have a few select option form inputs which have ‘All’ as an entry in them.
With jQuery, I want to do this:
[every 1 millisecond, check for and update all input fields if needed] << function
if ($dynamicchange == 'en') {
do not replace anything, the phrase stays as it is, 'All'.
}
if ($dynamicchange == 'tr') {
replace all input phrases every 1 millisecond, changing them to 'Hepsi'.
}
A sample input option I want to target is:
<select id="sub_cat" style="" name="sub_cat">
<option selected="selected" value="-10">All</option>
if the value of $dynamicchange is en, it stays as it is and if it’s tr, it changes to Hepsi.
How do I go about doing this? Any help is appreciated.
I don’t understand what you want exactly, but from what I’ve understood you could do something like this
Put the value in a hidden input
then do something like this
You can have a counter (not 1 ms your pc will explode) where it triggers again the function. You don’t make clear how this function will fire in the first place so I leave that to your judgement(I would do window.load())