Jump to content

running out of quotes


quickstopman

Recommended Posts

here i have a statement

and im running out "'s ''s \'s \"s

heres the statement

$.facebox('<form name="editTable"><p><h3>Edit Paragraph Style:</h3>Style: <select name="style1"><option value="border:#000 solid 3px;">Black 3 pixel border</option></select><br /><input type=\'submit\' onclick=\'$.facebox.close(); wrapTag("<p style=\'" + style1 +"\'>","</p>", document.forms.source.source_code); return false;\'></form></p>');

i have no idea whats happening because now the function doesn't work!!!

anyone know how to fix this? ???

Thanks!

-Zack

 

Link to comment
https://forums.phpfreaks.com/topic/99912-running-out-of-quotes/
Share on other sites

I can't really tell for sure what your function does without seeing the actual code, but this could be a problem

 

$.facebox.close(); wrapTag("<p style=\'" + style1 +"\'>","</p>", document.forms.source.source_code); return false;

 

(the onclick event)

 

simply, make a function that will run all these functions and use that function in the onclick event instead.

Link to comment
https://forums.phpfreaks.com/topic/99912-running-out-of-quotes/#findComment-511308
Share on other sites

You have some quotes wrong. Try this:

 

$.facebox('<form name="editTable"><p><h3>Edit Paragraph Style:</h3>Style: <select name="style1"><option value="border:#000 solid 3px;">Black 3 pixel border</option></select><br /><input type="submit" onclick="$.facebox.close(); wrapTag(\'<p style="' + style1 + '">\',\'</p>\', document.forms.source.source_code); return false;"></form></p>');

Link to comment
https://forums.phpfreaks.com/topic/99912-running-out-of-quotes/#findComment-511342
Share on other sites

ok, i see what i was doing wrong, not the problem is that the function isn't even working...

 

heres the function's code:

function wrapSpecialTag (tag) {
       if (tag == 'table') {
	$.facebox('<form name="editTable"><p><h3>Edit Paragraph Style:</h3>Style: <select name="style1"><option value="border:#000 solid 3px;">Black 3 pixel border</option></select><br /><input type="submit" onclick="$.facebox.close(); wrapTag(\'<p style="' + style1 + '">\',\'</p>\', document.forms.source.source_code); return false;"></form></p>');
       }
}

Help would be nice.

 

-Zack

 

Link to comment
https://forums.phpfreaks.com/topic/99912-running-out-of-quotes/#findComment-511583
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.