johnsmith153 Posted February 21, 2009 Share Posted February 21, 2009 How would I put: <input type="button" onClick="alert('hello');"> inside quotes?? <script> varName= "*goes here*"; </script> As obviously I have already used the " and ' Link to comment https://forums.phpfreaks.com/topic/146198-what-wrong-with-var-varname/ Share on other sites More sharing options...
darkfreaks Posted February 21, 2009 Share Posted February 21, 2009 http://www.davesite.com/webstation/js/javascript_basics_variables_and_button_actions.shtml Link to comment https://forums.phpfreaks.com/topic/146198-what-wrong-with-var-varname/#findComment-767552 Share on other sites More sharing options...
johnsmith153 Posted February 21, 2009 Author Share Posted February 21, 2009 That doesn't answer the question. I am sure the answer is something like... If you have used " and ', then escape a quote and use /" or "/ etc. This is ultra easy if you know how. Link to comment https://forums.phpfreaks.com/topic/146198-what-wrong-with-var-varname/#findComment-767555 Share on other sites More sharing options...
Philip Posted February 21, 2009 Share Posted February 21, 2009 varName = "<input type=\"button\" onClick=\"alert('hello');\">" Link to comment https://forums.phpfreaks.com/topic/146198-what-wrong-with-var-varname/#findComment-767564 Share on other sites More sharing options...
johnsmith153 Posted February 21, 2009 Author Share Posted February 21, 2009 Perfect. Easy if you know how. Thanks. Link to comment https://forums.phpfreaks.com/topic/146198-what-wrong-with-var-varname/#findComment-767572 Share on other sites More sharing options...
johnsmith153 Posted February 21, 2009 Author Share Posted February 21, 2009 and this is a javascript question!! Where are the moderators?? Link to comment https://forums.phpfreaks.com/topic/146198-what-wrong-with-var-varname/#findComment-767574 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.