Showing posts with label pages. Show all posts
Showing posts with label pages. Show all posts

Thursday, March 29, 2012

pop up windows with img and text from...?

using vb.net, with sql 2000 personal edition.

I'm trying to create a portfolio page, the pages would be divided into years from 2001 ~ 2004 with each page a link of projects that my company has done. when the link is clicked it would open a new window with both image and text.

my question is how should i build this pop up page, with over 90 images i do not want to create individual aspx pop up windows, so if i was to get img and text info where should it be coming from? would sql server or is there was a to put this info in the project page? I haven't a clue, plz help.

ps. if you can point me to an example on the net that would be great..

focusA good place to start may be the following tutorial:
A Robust Image Gallery for ASP.NET
wow thanks NewKid2~

i'm still reading it but its a great example, not only for my project but for my personal use as well, also i love the fact that its in vb.net there should be a page called top 10 everyday examples in vb.net for the noobie in you!

focus
> there should be a page called top 10 everyday examples in vb.net

Well, the same guys have written a bunch of ASP.NET articles, most of them using VB.NET, and all written in an easy-to-understand way.

You can see the entire list of their articles here:
http://aspnet.4guysfromrolla.com

Friday, March 16, 2012

Populating DIV tag from javascript via ASP.Net & ClientScript methods

I'm trying to run some clientside javascript on page load for one of my
ASP.Net pages. I am using the ClientScript.RegisterClient...() methods
to register an external javascript file within ASP.Net. When I put my
code on a ASP button and click it it works just find, runs my
javascript which popus up an alert and then changes the div text.
However, when I put this on a Page_Load event the alert comes up ok but
the changing of the div text does not occur. I have a feeling this has
something to do with not all the page elements being rendered or
avaiable in some way to the javascript. I've tried placing the code in
LoadComplete, and Init, with the same results. Any suggestions on how I
can get my javascript code to be triggered on page load from ASP and be
able to access page elements like div tags? I don't have my code in
front of me now but could come up with example if needed. Any advice is
appreciated.

David Mathew
mathewda@dotnet.itags.org.gmail.comusing masterpages? if so, it changes the client ID

Dave Mathew wrote:

Quote:

Originally Posted by

I'm trying to run some clientside javascript on page load for one of my
ASP.Net pages. I am using the ClientScript.RegisterClient...() methods
to register an external javascript file within ASP.Net. When I put my
code on a ASP button and click it it works just find, runs my
javascript which popus up an alert and then changes the div text.
However, when I put this on a Page_Load event the alert comes up ok but
the changing of the div text does not occur. I have a feeling this has
something to do with not all the page elements being rendered or
avaiable in some way to the javascript. I've tried placing the code in
LoadComplete, and Init, with the same results. Any suggestions on how I
can get my javascript code to be triggered on page load from ASP and be
able to access page elements like div tags? I don't have my code in
front of me now but could come up with example if needed. Any advice is
appreciated.
>
David Mathew
mathewda@.gmail.com


I think what you are running into is the javascript code being executed
before the elements of your page have been created in the page DOM.
Try to stick your javascript into the onload attribute of your body tag
and see if it will work.

If this does work, I think what you will have to do is register your
javascript with the onload event either by adding it as an attribute of
the body tag or via external script.

http://www.quirksmode.org/js/events_advanced.html
The above article is similar to what you could use to register your
javascript with the load event except of course the event you want to
register for is load (onload in IE) and I believe you want to use
window as your element.

I wrote a javascript register function that handles cross browser
registration a while ago but don't have it with me. Let me know if you
want it and I'll post it. I believe there are also similar examples
out there somewhere on the web.

Clint.

Dave Mathew wrote:

Quote:

Originally Posted by

I'm trying to run some clientside javascript on page load for one of my
ASP.Net pages. I am using the ClientScript.RegisterClient...() methods
to register an external javascript file within ASP.Net. When I put my
code on a ASP button and click it it works just find, runs my
javascript which popus up an alert and then changes the div text.
However, when I put this on a Page_Load event the alert comes up ok but
the changing of the div text does not occur. I have a feeling this has
something to do with not all the page elements being rendered or
avaiable in some way to the javascript. I've tried placing the code in
LoadComplete, and Init, with the same results. Any suggestions on how I
can get my javascript code to be triggered on page load from ASP and be
able to access page elements like div tags? I don't have my code in
front of me now but could come up with example if needed. Any advice is
appreciated.
>
David Mathew
mathewda@.gmail.com