PHP to Javascript | Hyperlink Navigation

Wow, another surprise, did I miss something in release notes! I hunted again and again, I think I got the treasure first :P Actually, today I was again looking into PHP support, so thought of opening my first ever PHP application, I created using Dreamweaver 8, WAMPServer (which was actually my semester project) last December.

I was going through application’s index.php, which had embedded php scripts, and links to javascripts using following tags-

<script type="text/javascript" src="styles/some_script.js"></script>

where styles/some_script.js is the script used, along with 2 more scripts. So, in body tag, there was a call to one of the functions belonging to one of the three .js files, like-

<body onload="javascript:call_func();">

So, today I was thinking, it would be nice if I click on this function, and get directed to the javascript which has this function, started visualizing it. By mistake, I pressed CTRL (Windows users) and started hovering the mouse over “javascript:call_func();” I was shocked to see it actually detected a hyperlink, I clicked and another shock, it navigated me to the exact line where the function is defined in a particular javascript.

Amazing, isn’t it? Another cool discovery ;)

What are you upto? :)

About these ads

8 thoughts on “PHP to Javascript | Hyperlink Navigation

  1. Hi,

    Opened my netbeans this morning and i saw this title – “PHP to Javascript | Hyperlink Navigation” -, so i thought of giving a look, cuz i’m looking for a php development tool. This function that you talked about, is it the NetBeans?

    Regards,
    Leo

  2. Hi Leo,

    it depends, which version of NetBeans you have installed. The PHP functionality is available in NetBeans 6.5. You can download NetBeans PHP distribution. If you are interested in PHP features you can go through http://blogs.sun.com/netbeansphp/ , where we describe some features.

    Thanks to Varun for this nice entry.

    Regards,
    Petr

  3. I’ve been doing this in Java classes for a long time and methods in Java classes would be taken to the appropriate classes. Also I think I’ve tried this in the JavaScript with a JSP page…

  4. Pingback: NetCAT 6.5 Weekly | Final Report « N, Varun

  5. Pingback: Top NetBeans Posts of Year 2008 « N, Varun

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s