Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   Simple VB script question (real easy) (https://thetfp.com/tfp/tilted-technology/54840-simple-vbulletin-script-question-real-easy.html)

Dilbert1234567 05-06-2004 08:54 PM

Simple VB script question (real easy)
 
ok i have a lot of experiance in VB, but none in VBS, i am trying to detect a NULL value from an Array and replace it with a string

the value is stored in VNR(5)

if VNR(5) is a NULL value then it should be replaced with the string nopic.gif

i know that vales are stored in VNR(5), i have tried using other search values other then NULL, like "1.jpg" which is one of the values that VNR(5) can return, when VNR(5) = "1.jpg", it is not changed to "nopic.gif" so i am quite confused about this.

Code:

<%if VNR(5) = NULL then
  VNR(5)= "nopic.gif"
  end if%>
 
<p><img src="Product_Pics\<%= VNR(5) %>" ></p>


any help would be a preciated.

Stompy 05-07-2004 12:45 PM

Try:

Code:

if IsNull(VNR(5)) then
....
end if


Dilbert1234567 05-07-2004 01:47 PM

well that helps, the is null fired just fine but it says that VNR(5) does not suport updating, im sure i can get that on my own, trhanks foir the help Stompy

Dilbert1234567 05-07-2004 01:48 PM

Code:

<%pic=VNR(5)%>

<%if IsNull(VNR(5)) then
  pic= "nopic.gif"
  end if%>
 
<p><img src="Product_Pics\<%= pic %>" ></p>

works like a charm

thanks again


All times are GMT -8. The time now is 03:33 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37