So i have to echo this

onclick="dhtmlHistory.add('location1',{message: 'backbox'});countdown()"

and if i echo " ...." the whole thing top it wont show because of the apostrophe

You can escape them by prepending them with a backslash.

It's ok this way?

echo("\onclick=\"dhtmlHistory.add('location1',{message: 'backbox'});countdown()\"");

Right, but you don't need the parenthesis.

 echo "onclick=\"dhtmlHistory.add('location1',{message: 'backbox'});countdown()\"";

thank you so much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.