homepage Welcome to WebmasterWorld Guest from 50.16.112.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Form Script conflict
Adsense code conflicting with Form Script
Rhys

10+ Year Member



 
Msg#: 3522106 posted 1:53 am on Dec 7, 2007 (gmt 0)

Hi -
The problem is that the Adsense JavaScript corrupts the input fields of a configuration form I use for un-geeks to paste in stuff to personalize their blogs.

The Data path is:
Configure_Blog.php Form reads from config_saved.php into input fields as VALUE=
User edits displayed data
Configure_Blog.php posts data to config.php as $_SESSION variables
config.php writes data back to config_saved.php

POST escapes the "s in the Adsense code and it all work perfectly up to the point where it requires to read the Adsense code back into the next form session as "Existing Code" and it reads it back in UN-escaped and corrupts the form.

I use this code in the form


<tr>
<td>Menu Ad Code</td>
<td><textarea cols="24" rows="2" onFocus="this.blur()" id="mac" name="mac" ><?php echo ($_SESSION["mac"]);?></textarea></td>
<td><textarea cols="17" rows="2" id="mac2" name="mac2" onfocus="value='<?php echo ($_SESSION["mac"]);?>'" onblur=" mac.value=value;"></textarea></td>
<td>Default Value = None</td>
</tr>

I think I need to be able to somehow ESCAPE the "s in the retrieved variable before INPUT-ing it.

The form works by displaying the saved data in the (un-editable)LH input field, and uses onblur to update it with user input data from the RH field.

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved