Jump to content

Dumb noob struggling with syntax


MarkRogers
 Share

Go to solution Solved by Ch0cu3r,

Recommended Posts

Hi all, this is my first post. Be gentle!

 

I'm trying to peform a small hack on a Joomla component to better suit by needs... Currently the 'trigger' has an event attached to it, that opens a browser window, the event looks like this (it works fine):

$eventprnt = 'onclick="window.open(\'index.php?myurl ='.$item->id.'\')" ';

I want to change the function from 'window.open' to 'window.location.href', but the quotes and semicolons thing is killing me (I keep getting T_STRING errors). I've included an example of one of my attempts to give you all a good laugh:

$eventprnt = 'onclick="window.location.href ='$index.php?myurl ='.$item->id.'"';

As you can probably see, I could be here for a while unless I ask for help... I've done a lot of reseacrh, and it sounds like I need backslashes, quotes... All sorts of stuff. Unfortunately it's all Chinese to me.

 

If you can give me a pointer, that would be a real help.

 

Mark

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.