Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
killing-hours
RavenNuke(tm) Development Team



Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx

PostPosted: Sat Apr 23, 2011 1:35 pm Reply with quote

Hey all-

Hitting a snag working with heavy jquery/3rd party scripts and not real sure how to debug this one.

The situation:

This is going to be really difficult to explain as it's pretty complex.

I'm trying to pass a path to a 3rd party script via jquery. The problem I'm running into is it "seems" like when it's passed... it's somehow tacking on the "admin.php?" to the beginning of the path and it's ultimately breaking it.

So in an effort to debug this to find out how that is happening... I created a test page and placed two examples on the page so I can better show you what I'm trying to understand.

example 1:
Code:
echo '<a href="">TEST</a>';


In this example... I've left the "href" tag empty so that I can see what happens when there is no path provided. This produces:
Image

The link automatically produces a link back to the originating page.

Example 2:
Code:
echo '<a href="1">TEST1</a>';


In this example, I filled the "href" with the number 1 and it produces:
Image

Now the "admin.php?op=SwankPreview" is removed and a link is built from the href.

(How is the link built automatically if the href is blank?)

Given the above question... I believe that will ultimately be the reason when I try to pass the path 3 layers into jquery.. it's being broken somehow by adding the "admin.php?" onto the beginning of the direct link.

---------------------------------

Ok, so after a bit more debugging and thinking about this... I've come to the conclusion that what is happening is that both "admin.php" & "modules.php" build a path as it's passed back through it.

I.e.

Code:
<a href="modules/test/test.file></a>


Would become

Code:
http://www.testsite.com/modules/test/test.file


But what is happening for me is that the first layer jquery that gets the path then tries to pass that path on... however, it goes back to the said .php file for link processing as it would from the initial stage and therefor breaks the link as the second script gets caught in the "?" in the pass on.

I.e.

First script has:
Code:
http://www.testsite.com/modules/test/test.file


as the path then tries to send it to the second script for use... but it gets passed via the admin.php?...

Like so...

Code:
admin.php?http://www.testsite.com/modules/test/test.file


What actually happens is the 2nd script gets a link like so:

Code:
?w.testsite.com/modules/test/test.file


The first 9 characters get gobbled up by the "admin.php" then the output link is left beginning at the ? and continues out the rest of the link.

------------------------

No need for an answer... I figured out what I was doing wrong in the jquery. Wink

_________________
Money is the measurement of time - Me
"You can all go to hell…I’m going to Texas" -Davy Crockett 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Apr 27, 2011 5:49 am Reply with quote

Thank goodness, but this one was going to be tough to help on without digging through the javascript code. Glad you got it sorted.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©