First off, Hi all. I've recently moved to PHP after a few months on C#, and I feel like I'm right back in year 1 at school. I'm working my way through a few tutes, and one of them has a (kind of) 'now it's your turn' at the end...
On the whole I've been doing OK, but one of the exercises wants me to change an 'open browser' window command to a simple link-to-page. I understand the principle but the syntax is killing me.
I haven't just come here to cheat, I've spent hours looking at various docs and guides, but I can't seem to crack this basic problem.
I'd ideally like to create the link using 'onclick' rather than use a standard link, can anyone help? Please?
11-29-2013, 09:26 AM
Separate your js from your html with a function call. Let the function set all the parms and execute the window.open call. Much easier to write and to understand afterwards. Just put the onclick clause in your html tag, ie:
Hope this helps.
12-17-2013, 02:22 PM