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 ' Quote 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 Quote 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. Quote 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');\">" Quote 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. Quote 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?? Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.