473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Calling a DIV from <a href and having a rewritable URL

OK, so this is my problem.

I'm trying to load an inline container using ibox. Basically it works fine, as long as when calling it, the URL is in the following structure: www.domain.com/likes.php (when clicked it produces www.domain.com/likes.php#inline_container

However if the domain is in the structure www.domain.com/likes/24 due to rewritable URLs, this doesn't work anymore (when clicked it produces www.domain.com/likes/24#inline_container

This is my code:

JS Import:
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src="ibox/ibox.js"></script>
  2.  
Div:
Expand|Select|Wrap|Line Numbers
  1. <div id="inner_content" style="display:none;">
  2.     <div style="background:#52425C;color:#ffffff;border:1px dashed #FFFFFF;padding:15px;margin:15px;">    
  3.                 <p>Sample text</p>
  4.     </div>
  5.     </div>
  6.  
Link:
Expand|Select|Wrap|Line Numbers
  1. <li><a href="#inner_content" rel="ibox&width=600&height=410" title="Sample Title!">Create Your Post!</a></li>
  2.  
What do you think is the best solution to call the DIV and ignore the URL Rewriting structure?

Thanks
Feb 10 '11 #1
1 3162
acoder
16,027 Expert Mod 8TB
You can avoid following the link by using return false onclick.

If you need the hash to be added to the URL, consider the structure of your URL and find out what can work, e.g. www.domain.com/likes/24/#inner_content
Feb 15 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Sorby | last post by:
Hi I've been coding in PHP for a little while now and was starting to feel pretty confident but then realise I need to understand regular expressions to solve a particular problem I've got ......
2
by: Gregor Horvath | last post by:
Hi, Before I reinvent the wheel I`d like to ask if someone has done this before since I did not find an advice at Google. The goal is to create a dynamic Tree View in HTML. Say I have a...
2
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
31
by: Yeah | last post by:
Is it absolutely necessary to include "http://" in an A HREF hyperlink? Would it be wise to remove this from one's Links page, just to save code?
10
by: Gernot Frisch | last post by:
Hi, I'm currently writing: <span onclick="window.open(...);">Klick Here</span> but I want to use the <a href> for this, since it is defined in the css script the way I want my link to open....
19
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have <a href="javascript:somefunction()"what ... ?...
1
by: rn5a | last post by:
Consider the following code: <script runat="server"> Sub Page_Load(obj As Object, ea As EventArgs) Dim sqlReader As SqlDataReader sqlReader = 'calling a function that returns SqlDataReader ...
3
by: ajos | last post by:
Hello friends, In my action class i am getting a resultset data which im storing in a arraylist. In my jsp page im retrieving the arraylist data as-----> <%publicity.PendingReqForm prfObj=null;...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.