Re: Passing values from PHP




Maybe:

html_value1 = "<?php echo $escapedToBeSafeForJSValue; ?>";

Always declare your identifiers:

var html_value1 = ...

Good point.


. . .
your_element.innerHTML=html_value1;

There is little reason for another variable here:

your_element.innerHTML = "<?php echo $escapedToBeSafeForJSValue; ?>";

Unless you wanted to pre-populate a variable for insertion at a later
point (an assumption)
.



Relevant Pages

  • Re: bitcopy in delphi.
    ... > Delphi. ... part of the reason your code looks simpler. ... destination buffers overlap. ...
    (alt.comp.lang.borland-delphi)
  • Re: Scottish Nobility - As he giveth, so shall he take away.
    ... the courage to stand up and be counted, even with the full weight of ... For the simple reason that when the words were inserted they were ... is to deprive a grant of arms of its enobling effect. ... So the insertion did nothing new, ...
    (rec.heraldry)
  • Re: Whtas the Story with document.createElement(iframe) in IE?
    ... var iframe = document.createElement; ... The answer he was looking for was really the *official* reason why the ... stupid mystical incantation in necessary in the first place ... That may be what you consider official, but it is nonsense nonetheless. ...
    (comp.lang.javascript)
  • Re: SolidWorks Subscription
    ... likely that if my VAR won't give me a break I simply won't ante up at ... 2006 for that reason, and I probably won't be anytime soon. ... > development in the last six years as a licensed user. ... > customers to continue this practice. ...
    (comp.cad.solidworks)
  • Re: Pub 2002 vs. 2007
    ... Only reason I did get Pub 2007 is because I upgraded OFFICE and it came with it. ... var bVer = parseInt; ... curtop += obj.offsetTop ... I have about 100 photos on my website, ...
    (microsoft.public.publisher.webdesign)