Solved

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

Posted on 2010-08-31
6
2,636 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

751 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