|
Paul Watson wrote:
Right next to the Why Life Is So Great inspirational video.
Ah, found it. Just next to "101 ways to reach Sto-Vo-Kor" On a more serious note, life is great. I've never doubted that. It's just that it's great in too many ways. I could've settled with half.
Paul Watson wrote:
It is a good lesson why you should not become dependant on what VS.NET tells you are possible values
How true! I'm baffled though that I didn't find what I was looking for at www.w3c.org[^]. I use the recommendation documents quite often. I guess I can conclude this with the cliché "It's hard to see the forrest with all the trees blocking my view"or whatever the saying is in English
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
Just looked and found vertical-align values[^].
Still, it is the browser implementations that are probably your biggest problem. Bet they are all over the place.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Hopefully it will work out fine. The biggest differences between IE and Mozilla based browser I've seen, with respect to CSS, are sizes. Percent sizes in CSS behave very differently depending on if you've specified a size in the parent element or not. Very peculiar since old style width and height attributes seem to work just fine.
The only requirements I have are that this should work on IE and mozilla based browsers, and I will do weird and wonderful hacks to make it work if necessary.
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
Been scratching my head for too long now, so I hope there are someone out there who can tell me how to do this:
What I got:
I got an Access database with two tables, one for productcategories and one for products. In the products table I also got a unit price column.
On a webpage I got a form with two dropdown boxes and a textfield.
What I am doing:
The first dropdown box dynamically displays product categories via VBscript. No problem. The second dropdown box dynamically shows products in the selected product category. (No need to reload page as I use a Javascript array to store every possible value. It's not a big database).
What I want to do:
I need the price to dynamically show up in the textfield when a product has been selected.
I know the theory behind it. I need to load all the prices into a Javascript array from the database... but I can't understand how this is done in the code. (I mainly copied and pasted the code I got so far).
Copy of successful code below, anyone that could tell me how I can get the prices into an array and make them appear in a textfield?
Cheers
John
--- CODE ------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="950"%>
<!--#include file="Connections/CoffeeDarts.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_CoffeeDarts_STRING
Recordset1.Source = "SELECT ProductType FROM ProductType"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim rslist2
Dim rslist2_numRows
Set rslist2 = Server.CreateObject("ADODB.Recordset")
rslist2.ActiveConnection = MM_CoffeeDarts_STRING
rslist2.Source = "SELECT ProductType, ProductName FROM Products"
rslist2.CursorType = 0
rslist2.CursorLocation = 2
rslist2.LockType = 1
rslist2.Open()
rslist2_numRows = 0
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<!-- Dynamic Dependent List box Code for *** VBScript *** Server Model //-->
<script language="JavaScript">
<!--
var arrDynaList = new Array();
var arrDL1 = new Array();
arrDL1[1] = "selList1"; // Name of parent list box
arrDL1[2] = "form1"; // Name of form containing parent list box
arrDL1[3] = "selList2"; // Name of child list box
arrDL1[4] = "form1"; // Name of form containing child list box
arrDL1[5] = arrDynaList;
<%
Dim txtDynaListRelation, txtDynaListLabel, txtDynaListValue, oDynaListRS
txtDynaListRelation = "ProductType" ' Name of recordset field relating to parent
txtDynaListLabel = "ProductName" ' Name of recordset field for child Item Label
txtDynaListValue = "ProductName" ' Name of recordset field for child Value
Set oDynaListRS = rsList2 ' Name of child list box recordset
Dim varDynaList
varDynaList = -1
Dim varMaxWidth
varMaxWidth = "1"
Dim varCheckGroup
varCheckGroup = oDynaListRS.Fields.Item(txtDynaListRelation).Value
Dim varCheckLength
varCheckLength = 0
Dim varMaxLength
varMaxLength = 0
While (NOT oDynaListRS.EOF)
If (varCheckGroup <> oDynaListRS.Fields.Item(txtDynaListRelation).Value) Then
If (varCheckLength > varMaxLength) Then
varMaxLength = varCheckLength
End If
varCheckLength = 0
End If
%>
arrDynaList[<%=(varDynaList+1)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListRelation).Value)%>"
arrDynaList[<%=(varDynaList+2)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListLabel).Value)%>"
arrDynaList[<%=(varDynaList+3)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListValue).Value)%>"
<%
If (len(oDynaListRS.Fields.Item(txtDynaListLabel).Value) > len(varMaxWidth)) Then
varMaxWidth = oDynaListRS.Fields.Item(txtDynaListLabel).Value
End If
varCheckLength = varCheckLength + 1
varDynaList = varDynaList + 3
oDynaListRS.MoveNext()
Wend
If (varCheckLength > varMaxLength) Then
varMaxLength = varCheckLength
End If
%>
//-->
</script>
<!-- End of object/array definitions, beginning of generic functions -->
<script language="JavaScript">
<!--
function setDynaList(arrDL){
var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
var arrList = arrDL[5];
clearDynaList(oList2);
if (oList1.selectedIndex == -1){
oList1.selectedIndex = 0;
}
populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
return true;
}
function clearDynaList(oList){
for (var i = oList.options.length; i >= 0; i--){
oList.options[i] = null;
}
oList.selectedIndex = -1;
}
function populateDynaList(oList, nIndex, aArray){
for (var i = 0; i < aArray.length; i= i + 3){
if (aArray[i] == nIndex){
oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
}
}
if (oList.options.length == 0){
oList.options[oList.options.length] = new Option("[none available]",0);
}
oList.selectedIndex = 0;
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_callJS('setDynaList(arrDL1)')">
<form name="form1" method="post" action="">
<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="120" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="120" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
</tr>
<tr>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="quantity" type="text" id="quantity" size="5">
</font></td>
<td><select name="selList1" id="select" onChange="MM_callJS('setDynaList(arrDL1)')">
<%
While (NOT Recordset1.EOF)
%>
<option value="<%=(Recordset1.Fields.Item("ProductType").Value)%>"><%=(Recordset1.Fields.Item("ProductType").Value)%></option>
<%
Recordset1.MoveNext()
Wend
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
</select></td>
<td><select name="selList2" id="select2">
</select></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">NT
<input name="unitPrice" type="text" id="unitPrice" size="6">
</font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="voucher" type="text" id="voucher" size="5">
張 </font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="refilled" type="text" id="refilled" size="5">
次</font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="discount" type="text" id="voucher3" size="5">
%</font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">NT
<input name="subTotal" type="text" id="subTotal" size="6">
</font></td>
</tr>
</table>
</form>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
rslist2.Close()
Set rslist2 = Nothing
%>
|
|
|
|
|
Hi,
In my recent project I have a requirement to support two browser
instances, each of them using 2 different dialup connection settings.
How can point a browser to point to specific dial up settings?
I checked MSDN and some other sites such as codeguru.com & codeproject.com ,
but all my efforts are in vain.
I tried with normal Internet Explorer setting Internet options, which If we change once
are affecting the settings globally.
and also I tried using web browser control and winINet API..
Can you please give me an idea which will show me some path to solve this problem?
Thanks alot in advance..
Kiran
|
|
|
|
|
Hi
How do webpages update themselves automatically, like the ones that shows the soccer scores during the world cup?
tx
|
|
|
|
|
G'day....
One (simple) way is to use the JavaScript "setTimeout()" function.
Eg:
timeDelay = 30; // Time of delay before refresh in seconds.
myTimer = setTimeout( "refreshThisPage();" , (timeDelay * 1000) );
function refreshThisPage() {
document.location.replace("www.MyURL.com");
}
Hope this helps!;)
-- JON --
Good Fast Cheap...
(Pick two, you can't have all three!)
|
|
|
|
|
|
A variation on this would be to use the XMHTTP object with "setTimeOut()" for a partial refresh.
Cheers,
Simon
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
|
there are a few ways of doing this..
one is with the META tag <meta http-equiv="refresh" content="100"> , which will reload the complete page after 100 seconds.
another, which I prefer when I really am not interested in reloading the entire page, is with an IFRAME. You can create an individual page the has the necesary process (ASP, PHP, whatever) and reloads after a couple of seconds.
<iframe left="0" top="0" width="600" height="80" z-index="2" scrolling="no" marginwidth=0 marginheight=0 frameborder=0 name="scores" src="http://www.yoursite.com/scores.asp"></iframe>
of course you'll have a page called scores.asp that will do whatever you need to do and have the <meta http-equiv="refresh" content="100"> so that only that section of your page does the trick.
IFRAMEs are pretty niffty since they work like a layer. You could even put it inside a cell of the main table of your site (for example).
hope that works
luck
Jon
x-zd Designs
|
|
|
|
|
Dear all,
I got a problem. I'll like to popup a window, and while it closed, I could get it's return value. I write those codes like this:
(***in main.aspx************************):
...
function popup(){
var r=window.showModalDialog("Search.aspx","QSWindow","Toolbar:yes");
document.all("Textbox1").value=r.returnID;
}
...
POP-UP Search window
(***and in search.aspx*******************):
...
function closeMe(rid){
this.returnID = rid;
}
...
Close ME
...
now I execute the main.aspx at IE6, and It appears an error message when I push 'Close ME' at search.aspx: "..returnID is null or not an object...."
So I can sure I don't get the return value. If someone could tell me why? or tell me another way to pass variables within main/search window using javascript? please~
Peter 2003.03.12 (Taiwan)
|
|
|
|
|
Hi all,
I've successfully created several web services and invoked them
without problem from my own machine. I've even consumed the services
from separate machines, but now I'm starting to think about deployment
and how exactly this is going to work.
Currently, I have the following directory structure for a web service
:
--- Web Services
--- MailWebService
--- Bin
As of now, all of the assembly references are copied locally in the
corresponding "Bin" directory. Obviously, this is a less than ideal
deployment structure, as most of these assemblies are used by other
applications/services and need to reside outside the
"Web Services\MailWebService\Bin". Ideally, I'd like to store all the
assemblies in one central "Bin" directory that both web services and
win applications can access, but I'm not exactly sure how I can
accomplish this. Prior to .NET, this was not a problem because of the
use of the registry, but I'm still a little ignorant how to accomplish
the same goal with .NET.
Any ideas on how I can reference the same assemblies from different
channels without having to duplicate bins across my directory
structure?
Thanks
-John
|
|
|
|
|
|
You can mix and match your managed and unmanaged code using MC++ - definitely at least take a look, since it may solve the problem
cheers,
Chris Maunder
|
|
|
|
|
|
Far better approach than starting a C# Web Service project...
I just couldn't help myself...
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
|
I hear ya. Been there, done that, trying real hard not to do it again. Refactoring in all glory, but it sucks when you have to do it in the 11th hour. Ripping out the guts from a carcass only to put it in a new host during stress is.. somewhat error prone.
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
|
You could try gSOAP. It's pretty simple to get up and running and is a highly compliant SOAP implementation. It uses a subset of C++ as an interface definition language that you feed to a compiler to generate client and server stubs. I managed to get a basic service going in a few hours. Its very portable too, if that's an issue for you.
Unique SOAP-to-C/C++ binding: gSOAP is application-centric and provides an automated mapping of native C/C++ and user-defined application data types to SOAP data types through the use of compiler technology. Data is marshalled in SOAP/XML "in-situ" by pre-compiled marshalling routines generated by the gSOAP compiler.
Legacy application integration: gSOAP is not a class library that offers SOAP-specific data structures. gSOAP includes a true RPC compiler for SOAP that supports application-specific data types.
Multi-threaded stand-alone SOAP servers: automatic C and/or C++ source code generation for efficient SOAP Web services (gSOAP 2.0 and higher). Load stress tests indicated that gSOAP has the best performance and scalability compared to other Web services toolkits and implementations.
Platform independent: Windows, Unix, Linux, Pocket PC, Mac OS X, etc.
Integrated WSDL generator: for convenient Web Service publishing.
http://www.cs.fsu.edu/~engelen/soap.html[^]
Ryan.
They read good books, and quote, but never learn
a language other than the scream of rocket-burn.
Our straighter talk is drowned but ironclad;
elections, money, empire, oil and Dad.
|
|
|
|
|
|
Yes.. Well nearly
If you need session control, then you have to use cookies not SOAP header processing. This might not be the case with Everett though, as I think support was added to .NET 1.1. Ditto for DIME attachments, I can only get .NET 1.0 to deal with base64 encoded data.
Other than that its been pretty good going. Have an ASP .NET site chatting away quite happily to FreeBSD machines. Click Add Web Reference Click mostly done..
Ryan.
They read good books, and quote, but never learn
a language other than the scream of rocket-burn.
Our straighter talk is drowned but ironclad;
elections, money, empire, oil and Dad.
|
|
|
|
|
Hi all,
My company is thinking about setting up online transactions with an SSL server, so am I correct in thinking we need an SSL certificate? Is this necessary? I have looked at Verisign, which is quite famous, but its really expensive compared to others. Is it worth this much extra? What about Thawte? Is that any good? Anybody know any other good ones?
Thanks in advance
Anthony Bates
|
|
|
|
|
It's to my understanding that the verisign certificate means little more "we (meaning verisign) approve of this websites online transactions".
Personally so long as I see the little lock in the browser window and I know my data is being encrypted from client to server and it's a site I trust...I could care less if there even is a certificate.
Nevermind super expensive stupid verisign...being all greedy...I hate companies like that...how is the little guy supposed to get ahead? Bullshite!!! Thats all it is...IMHO anyways
Cheers!
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|