Javascript question
- Started
- Last post
- 12 Responses
- detritus0
Back away now.
Sounds like they've read something about node.js or somesuch, then arbitrarily decided they want it despite not really having a clue what it is.
- dee-dubs0
Not 100% sure what they mean, but if it is along the lines of generating JS server side ie php that runs client side - then yes this would be possible.
IE PHP would echo or print the JS code before the page is then sent to the browser and executed.
- Although why you'd want to do this is another matterdee-dubs
- ESKEMA0
sounds like node.js, but like detritus said, if he doesn't know what it is, I'm not sure this is going to go well.
- vaxorcist0
the question is oddly worded ... at least to a developer....
you may want to read:
http://stackoverflow.com/questio…maybe node.js, but that's beyond the idea here I think...
sure, you can dynamically write JS client-side running code by using a server-side language, like PHP, note that QBN may tweek the code below....
<?php
if($somevar=="yes"){
echo "<form name=myform>
<input type=button value=\"click here now\"
onClick="alert('Hello from JavaScript!')\">
</form>";
?>Note the \" problem.... you have to escape quotes, this can drive you crazy
- CygnusZero40
Thanks guys. Ill send him these responses.
- oey0
BUMP!
- i_was0
Javascript will die, css will eat it.
- Al_dizzle0
/\ lol
- benfal990
Macromedia Flash will DEESTROY JabaScripss!1
- monNom0
if you want to load and execute arbitrary javascript from the server after page load, you need AJAX or maybe jsonp.