|
 |
asptoday_discuss thread: Images
Message #1 by "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...> on Mon, 18 Mar 2002 15:18:40 -0400
|
|
Hi guys,
Can someone help me?
I have 29 different images. On an ASP page I would like a button that would
say next, once you click next, it will open a different image in the page,
but, I only want one page for these images to be displayed. Can this be
done? If so does someone have the code for this or an example of the code?
Thanks
Message #2 by "ASIM ABBASI" <asim_electro@h...> on Mon, 18 Mar 2002 14:34:50 -0500
|
|
Following code will definitely help. I have written this for showing 84
pics. I u know VB then I think no further explanation is required.
Have Fun!
Regards,
Asim
www.geocities.com/eingenuity
<Script Language="VBScript">
Dim c,filename,MaxSlides
MaxSlides=84
c=1
Sub Window_Onload
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src =filename
End Sub
Sub image1_Onclick
Window.Open filename, "myWindowTwo", "width=740, height=570, resizable=no",
_
"toolbar=no, menubar=no, location=no, directories=no"
End Sub
Sub cmdNext_OnClick
c=c+1
if c > MaxSlides then
c = MaxSlides
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src = filename
End Sub
Sub cmdPrevious_OnClick
c=c-1
if c<1 then
c=1
End if
if c > MaxSlides then
c = MaxSlides
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src = filename
End Sub
Sub cmdGO_OnClick
MaxSlides=84
if Not IsNumeric(txtSlide.value) then
exit sub
Elseif txtSlide.value<1 then
c=1
Elseif CInt(txtSlide.value) > MaxSlides then
c = MaxSlides
Else
c = CInt(txtSlide.value)
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src = filename
End Sub
</Script>
----- Original Message -----
From: "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...>
To: "ASPToday Discuss" <asptoday_discuss@p...>
Sent: Monday, March 18, 2002 2:18 PM
Subject: [asptoday_discuss] Images
>
> Hi guys,
>
> Can someone help me?
> I have 29 different images. On an ASP page I would like a button that
would
> say next, once you click next, it will open a different image in the page,
> but, I only want one page for these images to be displayed. Can this be
> done? If so does someone have the code for this or an example of the code?
>
> Thanks
>
>
Message #3 by "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...> on Mon, 18 Mar 2002 15:39:26 -0400
|
|
Thanks
-----Original Message-----
From: ASIM ABBASI [mailto:asim_electro@h...]
Sent: March 18, 2002 3:35 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] Re: Images
Following code will definitely help. I have written this for showing 84
pics. I u know VB then I think no further explanation is required.
Have Fun!
Regards,
Asim
www.geocities.com/eingenuity
<Script Language="VBScript">
Dim c,filename,MaxSlides
MaxSlides=84
c=1
Sub Window_Onload
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src =filename
End Sub
Sub image1_Onclick
Window.Open filename, "myWindowTwo", "width=740, height=570, resizable=no",
_
"toolbar=no, menubar=no, location=no, directories=no"
End Sub
Sub cmdNext_OnClick
c=c+1
if c > MaxSlides then
c = MaxSlides
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src = filename
End Sub
Sub cmdPrevious_OnClick
c=c-1
if c<1 then
c=1
End if
if c > MaxSlides then
c = MaxSlides
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src = filename
End Sub
Sub cmdGO_OnClick
MaxSlides=84
if Not IsNumeric(txtSlide.value) then
exit sub
Elseif txtSlide.value<1 then
c=1
Elseif CInt(txtSlide.value) > MaxSlides then
c = MaxSlides
Else
c = CInt(txtSlide.value)
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "slides/" & "Slide" & c & ".jpg"
image1.src = filename
End Sub
</Script>
----- Original Message -----
From: "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...>
To: "ASPToday Discuss" <asptoday_discuss@p...>
Sent: Monday, March 18, 2002 2:18 PM
Subject: [asptoday_discuss] Images
>
> Hi guys,
>
> Can someone help me?
> I have 29 different images. On an ASP page I would like a button that
would
> say next, once you click next, it will open a different image in the page,
> but, I only want one page for these images to be displayed. Can this be
> done? If so does someone have the code for this or an example of the code?
>
> Thanks
>
>
Message #4 by "ASIM ABBASI" <asim_electro@h...> on Mon, 18 Mar 2002 14:49:54 -0500
|
|
Let me make things more easy for u.
Create folder with any name. In that folder create one folder with name,
Slides and create html file having the following code.
In Slides folder put all your pics.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 6</title>
<Script Language="VBScript">
Dim c,filename,MaxSlides
MaxSlides=84
c=1
Sub Window_Onload
lblStatistic.Caption=c & "/" & MaxSlides
filename= "Slides/" & "Slide" & c & ".png"
image1.src =filename
End Sub
Sub image1_Onclick
Window.Open filename, "myWindowTwo", "width=740, height=570, resizable=no",
_
"toolbar=no, menubar=no, location=no, directories=no"
End Sub
Sub cmdNext_OnClick
c=c+1
if c > MaxSlides then
c = MaxSlides
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "Slides/" & "Slide" & c & ".png"
image1.src = filename
End Sub
Sub cmdPrevious_OnClick
c=c-1
if c<1 then
c=1
End if
if c > MaxSlides then
c = MaxSlides
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "Slides/" & "Slide" & c & ".png"
image1.src = filename
End Sub
Sub cmdGO_OnClick
MaxSlides=84
if Not IsNumeric(frmMain.txtSlide.value) then
exit sub
Elseif frmMain.txtSlide.value<1 then
c=1
Elseif CInt(frmMain.txtSlide.value) > MaxSlides then
c = MaxSlides
Else
c = CInt(frmMain.txtSlide.value)
End if
lblStatistic.Caption=c & "/" & MaxSlides
filename= "Slides/" & "Slide" & c & ".png"
image1.src = filename
End Sub
</Script>
</head>
<body>
<p align="center">
<img name="image1" border="0" src="Slides/Slide1.JPG" width="381"
height="285"></p>
<table border="0" width="100%">
<tr>
<td width="50%">
<p align="right"><b>Slide Number:</b></td>
<td width="50%">
<object classid="clsid:978C9E23-D4B0-11CE-BF2D-00AA003F40D0"
id="lblStatistic" width="96" height="24">
<param name="ForeColor" value="0">
<param name="BackColor" value="16777215">
<param name="VariousPropertyBits" value="8388635">
<param name="Caption" value>
<param name="PicturePosition" value="458753">
<param name="Size" value="2540;635">
<param name="MousePointer" value="0">
<param name="BorderColor" value="2147483654">
<param name="BorderStyle" value="0">
<param name="SpecialEffect" value="0">
<param name="Accelerator" value="0">
<param name="FontName" value="MS Sans Serif">
<param name="FontEffects" value="1073741824">
<param name="FontHeight" value="165">
<param name="FontOffset" value="0">
<param name="FontCharSet" value="0">
<param name="FontPitchAndFamily" value="2">
<param name="ParagraphAlign" value="1">
<param name="FontWeight" value="0">
</object>
</td>
</tr>
</table>
<form name="frmMain" method="POST" action="">
<p align="center"><input type="button" value="Next" name="cmdNext">
<input type="button" value="Previous" name="cmdPrevious">
</p>
<p align="center">Jump To:<input type="text" name="txtSlide"
size="20"><input type="button" value="GO" name="cmdGo">
</p>
</form>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
</body>
</html>
Regards,
Asim
www.geocities.com/eingenuity
----- Original Message -----
From: "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...>
To: "ASPToday Discuss" <asptoday_discuss@p...>
Sent: Monday, March 18, 2002 2:39 PM
Subject: [asptoday_discuss] Re: Images
> Thanks
>
> -----Original Message-----
> From: ASIM ABBASI [mailto:asim_electro@h...]
> Sent: March 18, 2002 3:35 PM
> To: ASPToday Discuss
> Subject: [asptoday_discuss] Re: Images
>
> Following code will definitely help. I have written this for showing 84
> pics. I u know VB then I think no further explanation is required.
>
> Have Fun!
>
> Regards,
> Asim
> www.geocities.com/eingenuity
>
> <Script Language="VBScript">
> Dim c,filename,MaxSlides
>
> MaxSlides=84
> c=1
>
> Sub Window_Onload
> lblStatistic.Caption=c & "/" & MaxSlides
> filename= "slides/" & "Slide" & c & ".jpg"
> image1.src =filename
> End Sub
>
> Sub image1_Onclick
> Window.Open filename, "myWindowTwo", "width=740, height=570,
resizable=no",
> _
> "toolbar=no, menubar=no, location=no, directories=no"
> End Sub
>
> Sub cmdNext_OnClick
> c=c+1
> if c > MaxSlides then
> c = MaxSlides
> End if
> lblStatistic.Caption=c & "/" & MaxSlides
> filename= "slides/" & "Slide" & c & ".jpg"
> image1.src = filename
> End Sub
>
> Sub cmdPrevious_OnClick
> c=c-1
> if c<1 then
> c=1
> End if
> if c > MaxSlides then
> c = MaxSlides
> End if
> lblStatistic.Caption=c & "/" & MaxSlides
> filename= "slides/" & "Slide" & c & ".jpg"
> image1.src = filename
> End Sub
>
> Sub cmdGO_OnClick
> MaxSlides=84
> if Not IsNumeric(txtSlide.value) then
> exit sub
> Elseif txtSlide.value<1 then
> c=1
> Elseif CInt(txtSlide.value) > MaxSlides then
> c = MaxSlides
> Else
> c = CInt(txtSlide.value)
> End if
>
> lblStatistic.Caption=c & "/" & MaxSlides
> filename= "slides/" & "Slide" & c & ".jpg"
> image1.src = filename
> End Sub
>
> </Script>
>
> ----- Original Message -----
> From: "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...>
> To: "ASPToday Discuss" <asptoday_discuss@p...>
> Sent: Monday, March 18, 2002 2:18 PM
> Subject: [asptoday_discuss] Images
>
>
> >
> > Hi guys,
> >
> > Can someone help me?
> > I have 29 different images. On an ASP page I would like a button that
> would
> > say next, once you click next, it will open a different image in the
page,
> > but, I only want one page for these images to be displayed. Can this be
> > done? If so does someone have the code for this or an example of the
code?
> >
> > Thanks
> >
> >
>
>
|
|
 |