0

My client asked me to clone a particular mobile website with his content. When I digging through that website I came across something like this.

<a href="#listing.php?min=0&max=499999" class="ui-link">ABC</a>

What I want to know is whether this link directed to a PHP script inside the same page or any other PHP page. Since they have use hashtag (#) I feel like it's inside the same page. But this is not pointing to a div id.

I am new to PHP so I'll be glad if someone can give me a link to a good tutorial URL about these things.

Gajotres
  • 57,309
  • 16
  • 102
  • 130
Chrishan
  • 4,076
  • 7
  • 48
  • 67

2 Answers2

1

To jQuery Mobile this is a regular link to jQuery Mobile inner page, or to put it in different words, another page inside a same HTML. But why would someone call his page like that is beyond me.

One more thing to notice, page with that id would fail to raise any jQuery Mobile page event.

It can be tested here: http://jsfiddle.net/Gajotres/3278E/

HTML :

<!DOCTYPE html>
<html>
<head>
    <title>jQM Complex Demo</title>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi"/>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
    <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>    
</head>
<body>
    <div data-role="page" id="index">
        <div data-theme="a" data-role="header">
            <h3>
                First Page
            </h3>
        </div>

        <div data-role="content">
            <a href="#listing.php" data-role="button">Another Page</a>
        </div>

        <div data-theme="a" data-role="footer" data-position="fixed">

        </div>
    </div> 
    <div data-role="page" id="listing.php">
        <div data-theme="a" data-role="header">
            <h3>
                Second Page
            </h3>
            <a href="#index" class="ui-btn-left">Back</a>
        </div>

        <div data-role="content">

        </div>

        <div data-theme="a" data-role="footer" data-position="fixed">

        </div>
    </div>    
</body>
</html>   
Gajotres
  • 57,309
  • 16
  • 102
  • 130
  • how can we pass the parameters through this ? – Chrishan May 01 '13 at 21:44
  • Take a look at my other answer: http://stackoverflow.com/a/14469041/1848600, look for chapter called: Data/Parameters manipulation between page transitions – Gajotres May 01 '13 at 21:57
0

This URL formulation makes an AJAX-enabled web app crawlable by search engines. This is done to improve search-engine optimization (SEO). Data is loaded via AJAX for human visitors, but the URL records enough information for a crawler to load the same data without AJAX.

For details, see Google's AJAX crawling guide or and GreatFind's explanation.

George Cummins
  • 28,485
  • 8
  • 71
  • 90