|
I suppose that you were trying to ask a question?
If you are trying to ask how one would do to read a file using Javascript, the answer is that it can't be done.
The sample code for that is:
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi,
I have a class. this class do not have any function or procedures except for the initialization code in it
Code Snippet:
---------------------------------------------------
Class Init
Private Sub Class_initialize
msgbox ("INitialization class called")
If BRAND = "O" Then
URL = "http://ooo.com"
End if
If BRAND = "C" Then
URL = "http://ccc.com"
End If
End Sub
End Class
------------------------------------------------------
I tried instiantiate this class by
Set init = New Init.initialize() - Throwing an error message "Object doesn't support this property or methode 'Init.initialise'"
Set init = New Init - Throwing an error message "Illegal assignment: 'Init'"
--------------------------------------------------------
But both of this did not work. Can any one please let me know to instiantiate this type of class?
I am trying to use this class as a initialization class for my script.
Thanks,
Karthikeyan A
|
|
|
|
|
I don't understand what you are trying to accomplish. How does the variable BRAND get set to a value? How does anything access the URL that is set?
Mike Lasseter
|
|
|
|
|
HI,
The variable BRAND and URL are global variables and BRAND is assigned a value (O or G) out side this class. All i am trying to do inside the class is depending upon the BRAND value, i am trying to set value for the variable URL. I have only constructor and do not have any function or procedure. I tried instiantiate the class so that this constructor will be called, and was getting error during class instiantiation.
Hope i am clear in explaining my requirements.
Thanks,
Karthikeyan A
|
|
|
|
|
What language are you using? And why are you accessing global variables inside of a class? The values should be passed from the class using let/get propereties.
Mike Lasseter
|
|
|
|
|
I am using VBScript. Please let me know if you have an better ideal of implementation.
Thanks,
Karthikeyan A
|
|
|
|
|
See Code below.
<%@ LANGUAGE = "VBScript" %>
<%
class Init
private m_url
'--You can access these by var.Url
'--You could also do validation before you set the variables
public property get Url()
Url = m_url
end property
public property let Url(RHS)
m_url = RHS
end property
private sub Class_Initialize()
end sub
private sub Class_Terminate()
end sub
public function DetermineUrl(sBrand)
If sBrand = "O" Then
m_url = "http://ooo.com"
ElseIf sBrand = "C" Then
m_url = "http://ccc.com"
End If
DetermineUrl = m_url
end function
end class
dim test
Set test = New Init
'--Returns variable
Response.Write test.DetermineUrl("O")
'--Variable keeps its value so now there is no need for global variable
Response.write (test.Url)
test.Url = "http://ccc.com"
Response.write (test.Url)
%>
Mike Lasseter
-- modified at 11:15 Thursday 15th June, 2006
|
|
|
|
|
Actually I was looking into how exactly the tag would be handled...
I am currently trying to implement how exactly the image would be downloaded on coming across an IMG tag in a HTML..
Basic idea was to gradually build a browser .. so i was catching up on features of browser like hyperlink,Image rendering....
I would like to know how the images are queued up for downloading ...
What are the series of events that occur when we come across the IMG tag in a HTML...
I guess if we go by the generic architecture we have something called the Download Manager...
Can someone shed some light on the design and coding aspects
|
|
|
|
|
hi
i have asp dropdown with very long list, when i click on it show me around 30 items, and if items are more shows scroll bar, i want to remove this list to short, say 10 items and if items are more then 10 show scroll bar. can anyone tell me how can i do this.
Regards
Shajeel
|
|
|
|
|
|
I'm trying to send some form variable to my email address, however it doesn't work and I can't seem to figure out why.
Any help would be appreciated. Thanks!
<?php
if ($_POST) {
$FirstName = $_POST['firstname'];
$LastName = $_POST['lastname'];
$PhoneNumber = $_POST['phonenumber'];
$Email = $_POST['email'];
$City = $_POST['city'];
$State = $_POST['state'];
$Zip = $_POST['zip'];
$QuestComment = $_POST['questcomment'];
$to = "myemail@mysite.com";
$subject = "Question/Comment website user";
$message =
'First Name:'.$FirstName . "\r\n" .
'Last Name:'.$Last Name . "\r\n" .
'Phone Number:'.$PhoneNumber . "\r\n" .
'Email Address:'.$Email . "\r\n" .
'City:'.$City . "\r\n" .
'State:'.$State . "\r\n" .
'Zip:'.$Zip . "\r\n" .
'Question or Comment:'.$QuestComment . "\r\n";
}
else {
die ('You can't submit an empty form?');
}
$headers = 'From: ' . $Email . "\r\n";
mail ($to, $subject, $message, $headers);
?>
|
|
|
|
|
Hi,
Try replacing: if ($_POST) {
With: if ($_SERVER['REQUEST_METHOD']=="POST") {
If I remember right $_POST, along with $_GET, $_REQUEST, $_SESSION and $_COOKIE, are always set no matter what HTTP method is used to call the script.
Graham.
|
|
|
|
|
Read this, then come back and re-write your question.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi everybody,I'm a new comer to javascript.I have a question.English is not my mother language.I'll try my best to explain clearly what I mean.
Look at the following code:
<br />
<script type="text/javascript" language="javascript"><br />
<br />
var CallComplete;<br />
function MyFunction()<br />
{<br />
CallComplete = false;<br />
<br />
SeverMethod(CallBack);<br />
<br />
while (!CallComplete)<br />
{<br />
}<br />
return something;<br />
}<br />
<br />
function CallBack(response)<br />
{<br />
...<br />
CallComplete = true;<br />
}<br />
<br />
</script><br />
The ServerMethod is quite simple,and it will return immediately if I remove the while loop from the above code.But MyFuntion must wait for the severmethod's data to return values.
Is there any better way waiting for the asynchronous call complete? Any idea will be appropriate.
|
|
|
|
|
The reason for having a callback is that you don't need to wait for the call to complete. When it completes the callback method is executed. Whatever you need to do after the call completes, you can put in the callback method.
---
b { font-weight: normal; }
|
|
|
|
|
Hi guys..
How can i disable an html textbox?
|
|
|
|
|
It is too simple ....
vivek
|
|
|
|
|
It worked
Thank you
|
|
|
|
|
|
I have three different styles of links that I would like to have on page...
1. General links on the page
2. Navigation menu links
3. Page footer
The problem I'm having is that the different styles keep on affecting other ones randomly. For example, the general links on the page are supposed to be in (Verdana, Helvetica, Arial, sans-serif), however they are inheriting (monospace) from the footer?!?
I have the navigation menu setup in a div like this:
****************************************************
<div id="navmenu">
<a href="#">Menu Link 1</a>
<a href="#">Menu Link 2</a>
</div>
****************************************************
...and the footer setup liks this:
****************************************************
<div id="footer">
click <a href="#"> here </a>
****************************************************
Here is my CSS code:
****************************************************
/*NAVIGATION MENU LINK PROPERTIES*/
#navmenu a, a:link, a:visited, a:active {
padding-left: 25px;
padding-top: 5px;
padding-bottom: 5px;
font-variant: small-caps;
line-height: 30px;
letter-spacing: +1px;
font-family: cursive;
font-size: 12px;}
/*NAVIGATION HOVER PROPERTIES*/
#navmenu a:hover {
color: #eded0a;}
/*GENERAL LINK PROPERTIES*/
a, a:link, a:visited, a:active {
padding: 0px;
margin: 0px;
color: #f8f8f8;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 11px;
font-weight: normal;
font-style: normal;
text-decoration: none;
text-indent: 0px;
text-align: left;
font-variant: normal;
text-transform: none;}
a:hover {
padding: 0px;
margin: 0px;
color: #f8f8f8;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 11px;
font-weight: normal;
font-style: normal;
text-decoration: underline;
text-indent: 0px;
text-align: left;
font-variant: normal;
text-transform: none;}
#footer a, a:link, a:visited, a:active {
font-family: monospace;
font-variant: normal;
padding: 0px;
font-size: 10px;}
****************************************************
Thanks for any help you can give!
|
|
|
|
|
That is because you have specified the id for the a and a:hover elements only, the a:link, a:visited and a:active also need the id:
#navmenu a, #navmenu a:link, #navmenu a:visited, #navmenu a:active {<br />
<br />
#footer a, #footer a:link, #footer a:visited, #footer a:active {
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the responce. That worked perfectly!
|
|
|
|
|
Hi,
Is Inheritance of class possible in VBScript?
Can any one give me an example please?
Thanks,
Karthikeyan A
|
|
|
|
|
Karthikeyan_A wrote: Is Inheritance of class possible in VBScript?
No.
---
b { font-weight: normal; }
|
|
|
|