|
Background: I'm generating an html document from a c++ program, containing a lot of tables ( in the worse case, hundreds of tables ), and I'd like to limit the size of the document to a minimum.
Is it possible to put those in a CSS file ?
now, I put the following colgroup definition for each table.
<table>
<colgroup span="2">
<col width="20%"></col>
<col width=*></col>
</colgroup>
...
</table>
Is it possible to transfer that into a CSS definition file ? if so, what would be the syntax ?
Thanks.
M.
<hr><a href="http://www.thesorus.qc.ca">Maximilien Lincourt</a>
<b>Your Head A Splode</b> - <i>Strong Bad</i>
|
|
|
|
|
Hi. I need to get the username of people when they log into a secure area of my website. (I want to do it in php, so i can output each login with an IP, people keep passing out the password, i want to see what logins have multiple IPs).
Is there a way to do this in PHP or python? Im using apache with cPanel.
Thanks.
*.*
cin >> knowledge;
|
|
|
|
|
|
This is pretty simple.
once you have verified that your user is logged in, you can find his ip from the
$ip=$_SERVER['REMOTE_ADDR'];
Now you can store this $ip in a database to keep track of your users.
One glitch though, your users may want to access your site contents from different pcs
the ip would change in this case.
Also modem users get a new ip every time they log in. So dont just ban users who have multiple IPs
Any tool is only as good as you can use it!!
(http://www.pascalnet.tk)
|
|
|
|
|
we can get element's style such as color and so on,by how can we get element's
content by css?Recently,i found css2.1 can do so:
h1:before {
display: block;
text-align: center;
white-space: pre;
content: "chapter\A hoofdstuk\A chapitre"
}
by IE6.0 don't support css2.1,How can i do?
ok
|
|
|
|
|
If the browser you are catering to doesn't support CSS2, you can't do it obviously.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
if i am right, the latest version of Opera supports css2.1
You could use it to try out your scripts
but i would suggest that you wait till it is more standardised (IE begins to support it)
Whats the use if your code does not work on your clients PC.
Any tool is only as good as you can use it!!
(http://www.pascalnet.tk)
|
|
|
|
|
Hello,
I am still a new comer to asp.
Here is the little problem i am facing.
I have a drop down list on a page and what i want is when i sumbit it using javascript; on its back it should show the same selected entry i.e. what i selected before page was sumbitted.
here are the step:
1. i select from drop down.
2. it's submitted using javascript.
3. on the page is loaded again.
4. i want the same selected entry to be shown on the screen.
Thats it.
Looking for help on this.
Waiting
Asim
Regards,
Asim
|
|
|
|
|
Hi Asim,
Are you populating the drop-down box initially from ASP? or is it static in the HTML file?
If it's from ASP, then when you populate the drop-down see if the Form("field name") has a value, e.g.
<%
idxSelected = 0 ' the initial option you want selected
If Request.Form.Count>0 And Request.Form("idMyDD") <> "" Then
idxSelected = Request.Form("idMyDD") ' change to the selected one
End If
' generate drop-down contents
selected = ""
Response.Write("<select id='idMyDD' name='idMyDD' size='1'>" & vbCr)
For i=0 to 10
' strValue = however you want to populate...
selected = IIf(i=idxSelected, " selected", "")
Response.Write("<option value='" & i & "'" & selected & ">" & strValue & "</option>" & vbCr)
Next
Response.Write("</select>" & vbCr)
%>
Hope this helps,
Andy
|
|
|
|
|
Thanks,
drop down List is populated from database.
what i want is; when i select from list; form is submitted and some calculations are made. But the problem is when it's shown back the value i selected is not shown instead the default selected value is showed.
I want to see the value which i selected before form was submitted.
Regards,
Asim
|
|
|
|
|
This worked in my case:
<% sql="Select emp_id from employ_info"
set objRs= Server.CreateObject("ADODB.Recordset")
objRs.Open sql,conn,1,3
Do while not objRs.EOF
if Request.Form("employee_name") = objRs("emp_id") then
'if this is the selected one then display as selected
Response.Write ""
Response.Write objRs("emp_id") & ""
objRs.MoveNext
else
Response.Write ""
Response.Write objRs("emp_id") & "
objRs.MoveNext
end if
loop
objRs.Close
set objRs = Nothing
%>
Regards,
Asim
|
|
|
|
|
I have three problems with my current code.
1. I'm a newbi.
2. I have Parent/child linked dropdown boxes and they work great. I know how to add the onchange property but the child box doesn't have an empty value as its initial value. The initial value is a piece of data, but I can't select it because it isn't a change. I could use onclick, but that causes data to fill the page when I click on the box to drop it down and show data That I can choose from. I need help in figuring out how to set the initial value to an empty value.
3. The data in the child dropdown box are dates with times. Multiples of the same date, but with different times because the data is from a running log of transactions. I would like the results to be filtered so that there maybe 10 records of dates and times but, I want instead of showing all of those 10 records it shows one instance of that date.
I hope I haven't confused anyone. I appreciate all your help.
Here's my full code. I'm using a frameset and DreamWeaver MX.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_Sign_STRING
Recordset1.Source = "SELECT Name FROM SignOut ORDER BY Name ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_Sign_STRING
Recordset2.Source = "SELECT Name, TimeModified FROM Log ORDER BY TimeModified ASC"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
<title>Test
<%
While (NOT Recordset1.EOF)
%>
" <%If (Not isNull((Recordset1_first))) Then If (CStr(Recordset1.Fields.Item("Name").Value) = CStr((Recordset1_first))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(Recordset1.Fields.Item("Name").Value)%>
<%
Recordset1.MoveNext()
Wend
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
|
|
|
|
|
the first problem you have, is it really because of your code.
Bhaskara
|
|
|
|
|
Thanks! I didn't notice that!
Mind sharing what's wrong with it? It actually works great. Just need a few tweaks to make it work exactly the way I want it to. This code was mostly generated by DreamWeaver and a few scripts I made with the help of Macromedia training.
I apologize for the sarcasm, but you really didn't help.
|
|
|
|
|
I have two frames. The second frame is capturing all mouse up events. There are also link and text in span which both capture mouse down event and return 'false' in order to prevent drag and drop or text selection in Netscape/Mozilla.
So I press mouse down over link or text into the second, move cursor over the first and release mouse up. No event for mouse up triggers into second frame. If I make the same thing starting with mouse down from any text or any other point in the second frame the event for mouse up is triggered and I capture it successfully.
Why Mozilla acts in this way? Any ideas? Actually what I am trying to do is to realize my own drag and drop from second frame to the first. Of course I need frames because the second frame can load any URL at any time while at the same time the content of first remains unchanged.
Regards, Alexi
PS: Exampe of span
some text
|
|
|
|
|
I have two frames and I want to realize Drag&Drop. When I press mouse down in the first one and try to release it at the second I didn't receive at second one the mouse up event. Why? How can I make workaround. I need it in order to find div in the second frame where mouse up occures. I am just trying to avoid calculations. Any advice?
Regards, Alexi
|
|
|
|
|
Hi,
I have an asp page called main.asp, This page contains some around 30 form elements. When I presses the submit button, I called a JAVASCRIPT method to collect and validate all of the values.
After validation I need to pass all of the values to a page called submit.asp which is visible using an IFRAME in main.asp
The idea of passing values along with the url and getting them using QueryString is good for small number of elements but for a large number of elements it is not feasible.
I need to know how should I get all those form values on submit.asp without passing them with the url
I chooses this strategy because I donot want to post my page to because it is a combination of more then 100 elements.
Help kindly appreciated.
Thanks.
The Phantom.
|
|
|
|
|
Using the query string limits you, as you mention. That's why there is a second method supported - POST. Using this method, each element on the form has a name attribute and a value. When you submit it, the target page can access the value of each element by using Variable = Request.Form("Name"). For example, the form
<FORM Action = "VerifyUsrName.asp" Method=POST>
<P><INPUT Name = "usrName" Type = "text"></P>
<P><INPUT Type = "Reset" Value = "Reset Data"></P>
<P><INPUT Type = "Submit" Value = "Click to Send"></P>
</FORM>
accepts a single item - the name of the user. In the target page, VerifyUsrName.asp, the script between <BODY> tags
<%
Dim strUsr
strUsr = Request.Form("usrName")
%>
will pass the name entered by the user on the form to the variable strUsr on the verification page.
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
Since you can't use GET, and you don't want to use POST...
Can you split your page into multiple pages? For example, if the form is for collecting people's resume, you could ask them to provide their personal info on one page, then submit it using GET/POST as you like, process it, on to the next page, ask for their educational and other qualifications, submit again, next page, etc...
Doing it this way will make it look more organized, and also take care of your little problem.
Whenever you get stuck like this, it's time to take a step back and take another look at the design. 30 fields on a single page are a bit too much anyway, IMO. Think of the poor user.
HTH.
Regards,
Rohit Sinha
Browsy
Do not wait for leaders; do it alone, person to person.
- Mother Teresa
|
|
|
|
|
>> because I donot want to post my page to because it is a combination
>> of more then 100 elements.
Sorry but that just does not make any sense. Use POST.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
After you have validated your fields, you can submit the form using javascript:
<br />
<br />
document.FORMNAME.Submit();<br />
<br />
this will act exactly like a submit button.
Make sure that on your Form tag you have an action attribute set to "submit.asp", and a method attribute set to "POST"
In the submit.asp page you are able to access the values using Request.Form("NAMEOFCONTROL").
hope this helps,
sivilian
|
|
|
|
|
I have a large web application (written with ASP/VBScript) that has been hosted on Windows 2000 Server up until now, but now I have to migrate it over to our new Windows 2003 Server. Microsoft doesn't seem to believe in backwards compatibility anymore, and so I'm having problems.
A whole bunch of the code deals with paged recordsets, such as the absolutepage property, and because of what we'll be doing in a month or so, it's not feasible right now to actually go through making and testing changes to the source code.
The problem occurring (only on Win2k3, not Win2k) is this:
ADODB.Recordset error '800a0cb3' <br />
<br />
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
I have tried changing the database code to both static and dynamic cursors, and installing MDAC 2.8, both to no avail.
Why on earth does this cause an error on Windows Server 2003 but not on Windows 2000? What can I do to make it work?
NATHAN RIDLEY
Web Application Developer
email: nathan @ netlab.com.au
[remove the spaces before and after the @ symbol]
|
|
|
|
|
Hope it will work.
http://support.microsoft.com/default.aspx?scid=kb;en-us;255707
Cheers,
The Phantom.
|
|
|
|
|
This is for a toolbar.
It adds a list to the registry and each url is listed and when you enter in the toolbar, your search term,
it replaces the %s with the search term.
I want to have this url
http://www.google.com/search?hl=en&ie=UTF8&q=sl&btnG=Google+Search
to look something like this
javascript:void(window.open("http://www.google.com/search?hl=en&ie=UTF-8&q=%sl&btnG=Google+Search"));
so the toolbar opens a new window when the search is made.
The problem with the javascript above, is that it works but I cant use " " when needed.
This one below, adds quotes but they are permanent so It always searches with Quotes.
window.open("http://www.google.com/search?hl=en&ie=UTF-8&btnG=Google+Search&q="+escape('"%s"'))
Any ideas what will work?
Thanks for your help!!!!
Does anyone know how I can make this work? Im a novice and Im totaly lost. . Thanks
|
|
|
|
|
<script language="javascript">
function doSearch()
{
void(window.open('http://www.google.com/search?hl=en&ie=UTF-8&q="hello world"&btnG=Google+Search'));
}
</script>
That worked in IE 6 on Windows XP
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|