Closed Thread Icon

Topic awaiting preservation: page search and replace (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=8567" title="Pages that link to Topic awaiting preservation: page search and replace (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: page search and replace <span class="small">(Page 1 of 1)</span>\

 
wcr one
Paranoid (IV) Inmate

From: seattle
Insane since: Mar 2001

posted posted 03-10-2003 19:53

Hello all,

I was wondering if there was a way to search a loading page and replace a value? I have a page with numeric data loading, and in places where we do not know have information we have the number 999 as a place holder for 'unknown'. as the page loads I would like to recognize the 99 and replace it with NA. The page is in ColdFusion, though I do not think this would matter.

I am just unsure where to start this because there are about 36 data fields returned and each one needs to be searched, but obviously don't want to write a piece of js for each one. Just looking for the first little bread crumb on the trail to success here.

any help is greatly appreciated.

thanks

bill

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 03-10-2003 20:32

wcr one: I'd process the data server-side before dropping it into the page rather than use JS afterwards but I don't know enough about CF so..........

___________________
Emps

FAQs: Emperor

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 03-10-2003 21:26

Yeah, do that server side in cold fusion -- Shouldn't be too difficult.

The problem with re-writing content client side is that it's not very well supported. Unless your using JavaScript to document.write the data in the first place you'll need to using something like innerHTML() which only works in IE5+, NS6+ and Opera7+... OR you could try and walk the DOM nodes but eh, that'd be rather painful. So um yah, it can be don in JavaScript but it'd be a pain to do it that way. If you can do it server side then please do.

The only reason you'd ever want to do operations like this client side would be it you wanted certain values to change on-the-fly after the page had loaded. For dynamic content changes, use JavaScript (NB: dynamic content changes aren't very 'accessible' for browsers that don't support JavaScript), for static content changes, do it server side.


wcr one
Paranoid (IV) Inmate

From: seattle
Insane since: Mar 2001

posted posted 03-10-2003 22:23

Thanks a bunch guys. will get going on that.

have a good one.

bill

« BackwardsOnwards »

Show Forum Drop Down Menu