Solved

Drupal.settings.basePath...what is this path?

Posted on 2010-08-31
6
2,659 Views
Last Modified: 2012-06-21
Hey all,
I have an script that I'm trying to figure out and it uses the following then appends more to the path.  My question is...what is the path to Drupal.settings.basePath ?

How can I find the url/path for: Drupal.settings.basePath ?

Thank you.
0
Comment
Question by:ModifyMe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 33567698
Have a look at the following:

http://drupal.org/node/114774#base_path

Gary
0
 

Author Comment

by:ModifyMe
ID: 33567745
Yeah, and I'll be honest...I really could not understand it.  Just wondering if Drupal.settings.basePath is static.  

If so, what is the actual path?  
If not, is there a way to find the url/path it's pointing to?
0
 
LVL 46

Accepted Solution

by:
tbsgadi earned 500 total points
ID: 33567838
0
Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

 

Author Comment

by:ModifyMe
ID: 33567968
Ok Gary, I may be over my head on this one.  A former employee developed this module which did work, but now for some reason does not and I am trying to troubleshoot to fix.

I did review the link you just sent at akchauhan and understand it a bit more.  But my knowledge may be starting to become limited.

In our custom .js script, there is a variable which looks like the following:
var url = Drupal.settings.basePath +  "xxxx/xxxx_url";

So my goal is to figure our what this path is...

Sorry for being vague, this is my first experience with custom module development in Drupal.
0
 
LVL 17

Expert Comment

by:Thomas4019
ID: 33569077
if all you want to do is figure out what is it add this line to your javascript file. It should temporarily make a really annoying popup window with the value.
alert(Drupal.settings.basePath);
0
 

Author Closing Comment

by:ModifyMe
ID: 33643223
Thank you!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question