7 Replies - 14480 Views - Last Post: 30 December 2011 - 01:44 PM

#1 websitepro   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 28-December 11

How do I popup a div next to a link reguardless of scroll position?

Posted 28 December 2011 - 09:21 AM

We have a page which will diplay around 150 records at a time and for each record there is a link to input data. I want to be able to click that link on any record and have this one div with all the fields and updatepanel popup next to it.

I have found many JQuery examples of this, however none of the JQuery examples will allow me to Async-postback from the div which is very annoying. I also found examples where I place a div below each link and it pops up nicely, however this wont work because I need this to be only one div which contains the updatepanel and the associated inputs.

Do you know of a simple way to popup a div relative to the link? preferrably to the lower left of the onclick link/object.

I cant use the CSS left/top/right/bottom stuff becasue I need this to be relative to the object and not the entire page.

Thanks in advance.

Is This A Good Question/Topic? 0
  • +

Replies To: How do I popup a div next to a link reguardless of scroll position?

#2 trevster344   User is offline

  • The Peasant
  • member icon

Reputation: 225
  • View blog
  • Posts: 1,526
  • Joined: 16-March 11

Re: How do I popup a div next to a link reguardless of scroll position?

Posted 29 December 2011 - 01:03 PM

What are you coding in? It would be best that you place your thread in a forum of the corresponding language you're working with, so as to up your chances of finding an audience available to help you directly.
Was This Post Helpful? 0
  • +
  • -

#3 websitepro   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 28-December 11

Re: How do I popup a div next to a link reguardless of scroll position?

Posted 29 December 2011 - 01:09 PM

VB.NET & Javascript
Was This Post Helpful? 0
  • +
  • -

#4 RudiVisser   User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1010
  • View blog
  • Posts: 3,566
  • Joined: 05-June 09

Re: How do I popup a div next to a link reguardless of scroll position?

Posted 29 December 2011 - 01:14 PM

This is nothing to do with VB.NET at all, and your website isn't written in VB.NET it's written in HTML.

A jQuery solution to this would be fairly simple, including something like getting the top/bottom of the element and updating it.

$('a').click(function() {
    var offsetsForLink = $(this).offset();
    alert("Offset Top: " + offsetsForLink.top + ", Left: " + offsetsForLink.left);
    // $('div#movemenexttolink').css({left: offsetsForLink.left + 60, top: offsetsForLink.top + 10});
});

This post has been edited by RudiVisser: 29 December 2011 - 01:14 PM

Was This Post Helpful? 0
  • +
  • -

#5 websitepro   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 28-December 11

Re: How do I popup a div next to a link reguardless of scroll position?

Posted 29 December 2011 - 02:49 PM

Thanks I will look into that. An ASP.NET site may be displayed as HTML and Javascript but it sure is not coded with simple HTML. Sorry for the big mistake of posting on the wrong thread.
Was This Post Helpful? 0
  • +
  • -

#6 websitepro   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 28-December 11

Re: How do I popup a div next to a link reguardless of scroll position?

Posted 29 December 2011 - 02:57 PM

I also wanted to comment on your statement of this not having to anything to do with VB.NET. If you read my first post I stated that I was having trouble with none of the Jquery solutions working with the postbacks.
Was This Post Helpful? 0
  • +
  • -

#7 h4nnib4l   User is offline

  • The Noid
  • member icon

Reputation: 1567
  • View blog
  • Posts: 2,198
  • Joined: 24-August 11

Re: How do I popup a div next to a link reguardless of scroll position?

Posted 30 December 2011 - 10:29 AM

View Postwebsitepro, on 29 December 2011 - 02:49 PM, said:

Thanks I will look into that. An ASP.NET site may be displayed as HTML and Javascript but it sure is not coded with simple HTML. Sorry for the big mistake of posting on the wrong thread.


That's the thing though, you ARE writing HTML. You may be using ASP.NET to write the HTML for you, but to not understand the difference is a problem (I'm not accusing of this, I'm simply point this out). Also, you DID state that you were using VB.NET and Javascript, with no mention of ASP.NET. While you may expect that to be inferred, you have to understand that that will raise eyebrows in the HTML & CSS forum, and you certainly shouldn't get upset for being corrected.
Was This Post Helpful? 0
  • +
  • -

#8 websitepro   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 28-December 11

Re: How do I popup a div next to a link reguardless of scroll position?

Posted 30 December 2011 - 01:44 PM

The whole issue is simply rediculous and the need to point something like that is simply arrogant and should have never been made. I have been programming for 18 years. I certainly know the difference between HTML and other forms of coding.

That question was about which language I was coding in was made when this topic was in the VB threads. The issue here is that using an asp.net updatepanel within a div, using a Jquery function is not working, which totally relates to what I am using. If you dont know .NET and its functionality, you would most likely not relate to the issue with Jquery.

If the response had a complete javascript/non-Jquery formula, than I would not expect their information givin to relate and may have expected a response like his.

It always boils down to people on forums that have a need to act superior and it ticks me off when they take a bite at someone with many years of experience in other aspects of coding.

Shame on me for having to be a coder first and a piddly-html-layout person second. But I would assume my pay checks make up for it.

Never is it easy for someone to assume others may have more experience in more complex avenues and simply need help with the simple things that they have never done in the past.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1