SRHY15
SRHY15

Reputation: 95

Why does this change in the URL affect JQuery?

I'm teaching myself JQuery by creating a lightbox. My JQuery works when I enter in this URL:

http://localhost/bookshook/other_projects/zachitemdescription.php?id=21

But when I enter in this URL, it doesn't work:

http://localhost/bookshook/other_projects/zachitemdescription.php/?id=21 

Why does that extra backslash stop the jQuery?

Upvotes: 1

Views: 54

Answers (1)

Rory McCrossan
Rory McCrossan

Reputation: 337743

It doesn't just stop jQuery - it's a request to a completely different page.

The first URL is calling zachitemdescription.php, with the querystring values of id=21.

The second URL is calling the default document of the zachitemdescription.php folder, with querystring values of id=21, which I'm guessing does not exist in your case.

Upvotes: 8

Related Questions