|
don't worry about not solving the issue. it's the will that counts.
i'll look into the article, thanks!
kind regards.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
Hi,
My requiremnt is that I need to update my website with live update of events and alarms . The events can go up to 250 numbers per second. I have an idea that Ajax Push can be used for the live update of events. Can anyone explain me how it can be done ?
Can any system handle such a magnitude of events?
-Balaji
|
|
|
|
|
Hi everyone,
Could you please show me how to change server system datetime using ASP code?
Thanks in advance.
|
|
|
|
|
Do you mean change the locale / default date format from, say dd/mm/yyyy to mm/dd/yyyy ? You can't - you cannot change a person's server settings from an asp application, thank god! Imagine if every asp application you ran changed your computer's settings! You wouldn't know where you stood from one minute to the next, let alone the damage that could cause.
You can format the datetime values within an application using the VBScript FormatDateTime function (classic ASP) or the ToString function in .NET
Fred
|
|
|
|
|
hello,
i need the user ion my web page to be able to send a message without using his e-mail adress, so he just write his message, the subject and send
thank you in advance
bachirium
|
|
|
|
|
Then, set someone else address in Form field of Message object.
objMM.From = "someoneelse@someotheraddress.com"
Ref: http://www.4guysfromrolla.com/webtech/080801-1.shtml
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Most SMTP servers need a valid From Address to prevent SPAM or getting themselves from succumbing to relay SPAM.
|
|
|
|
|
hi,
i have tried many times to display next next record and previous record which is in ms_access data through asp in flash ,
correct output is not coming , this is the code, please correct this.
<%@Language="VBScript"%>
<%
Dim oRS, oConn,x,intCount
Set oRS = Server.CreateObject("ADODB.Recordset")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("mail.mdb")
oConn.Open
oRS.Open "SELECT * FROM mailTab", oConn, 2, 4
intCount = oRS.RecordCount
Response.Write("helloooooooooooo="&intCount)
do until oRS.EOF
for each x in oRS.Fields
Response.Write "&fname=" & Server.URLEncode(oRS("FirstName")) & "&lname=" & Server.URLEncode(oRS("LastName")) & "&email=" & Server.URLEncode(oRS("EMail")) & "&mess=" & Server.URLEncode(oRS("Message"))
next
Response.Write(" ")
oRS.MoveNext
loop
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
%>
dsd
|
|
|
|
|
This code will work in IE6 but not in Firefox or Netscape. I believe that the event.clientX is the problem but I am not sure how to fix it. Any ideas? I know I am just over looking something.
<br />
function newPopup(current)<br />
{<br />
this.idName = current + "popup";<br />
this.text = "Click here.";<br />
this.browser = navigator.appName;<br />
this.displayPopup = display;<br />
}<br />
function display()<br />
{<br />
document.write("<div id='" + this.idName + "' class='popup'>");<br />
document.write("<div class='subPopup'>" + this.text + "</div>");<br />
document.write("</div>");<br />
}<br />
function showPopup(current)<br />
{<br />
var id;<br />
var x;<br />
var y;<br />
id = current + "popup";<br />
x = event.clientX + top.document.body.scrollLeft;<br />
y = event.clientY + top.document.body.scrollTop - 40;<br />
top.document.getElementById(id).style.display = "block";<br />
top.document.getElementById(id).style.left = x + "px";<br />
top.document.getElementById(id).style.top = y + "px";<br />
}<br />
function hidePopup(current)<br />
{<br />
var id;<br />
id = current + "popup";<br />
top.document.getElementById(id).style.display = "none";<br />
}<br />
Thanks,
Chad Dolan
|
|
|
|
|
Can you provide the whole codes (including HTML) that you said it's working in IE?
I will try to reproduce in Firefox and will let you know the result.
chaddolan wrote: top.document.getElementById(id).style.display = "block";
top? are you using frame ?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Here is the HTML and the javascript from the first post is in the anima.js. I hope this helps.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Guardian Gate Index</title>
<!-- Linking Cascading Style Sheets -->
<link type="text/css" rel="stylesheet" href="CSS/mainPageLayout.css" />
<link type="text/css" rel="stylesheet" href="CSS/mainPageMenu.css" />
<link type="text/css" rel="stylesheet" href="CSS/mainPageHeader.css" />
<link type="text/css" rel="stylesheet" href="CSS/mainPageFooter.css" />
<!-- End Linking Cascading Style Sheets -->
<!-- JavaScripts Area -->
<script type="text/javascript" src="javascripts/anima.js"></script>
<!-- End JavaScripts Area -->
</head>
<body>
<!-- This is the page layout table -->
<table id="mainTable" cellpadding="0" cellspacing="0">
<tr>
<td id="mainTableHeader">
<!-- This is the top of the html page. Displaying company logo -->
<script type="text/javascript" src="javascripts/mainPageHeader.js"></script>
<!-- Add additional text and html tags here. -->
<div id="headerTitle">Gate Index</div>
<div id="guardianTitle">Guardian Glass</div>
</td>
</tr>
<tr>
<td id="mainTableMenu">
<!-- This is the main menu for the page -->
<script type="text/javascript" src="javascripts/mainPageMenu.js"></script>
</td>
</tr>
<tr>
<td id="mainTableDisplay">
<!-- This is the main body of the page. -->
<!-- Add text and additional html tags here. -->
<div id="control" onmouseover="showPopup('control')" onmouseout="hidePopup('control')"
onmousemove="showPopup('control')">
Testing menu position and popup
</div>
<script type="text/javascript">
//<!--
var popup = new newPopup("control");
popup.text = "Click here!!";
popup.displayPopup();
//-->
</script>
</td>
</tr>
<tr>
<td id="mainTableFooter">
<!-- This is the bottom of the page. -->
<script type="text/javascript" src="javascripts/mainPageFooter.js"></script>
</td>
</tr>
</table>
<!-- This ends the page layout table -->
</body>
</html>
And here is the code from the CCS for the popup.
/*
Popups ballons Styles
*/
div.popup
{
visibility: hidden;
position: absolute;
background-image: url("../images/popupBallon.gif");
background-repeat: no-repeat;
text-align: center;
vertical-align: middle;
height: 50px;
width: 160px;
z-index: 1;
}
div.subPopup
{
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
font-size: 12px;
}
Thanks,
Chad Dolan
-- modified at 7:56 Wednesday 22nd August, 2007
|
|
|
|
|
Try the code below ~
function showPopup(current,evt)<br />
{<br />
var id;<br />
var x;<br />
var y;<br />
id = current + "popup";<br />
if(window.event){<br />
x = event.clientX + top.document.body.scrollLeft;<br />
y = event.clientY + top.document.body.scrollTop - 40;<br />
}<br />
else{<br />
var e = (window.event) ? window.event : evt; <br />
if(e != null){<br />
x = e.clientX + top.document.body.scrollLeft;<br />
y = e.clientY + top.document.body.scrollTop - 40; <br />
}<br />
}<br />
top.document.getElementById(id).style.display = "block";<br />
<br />
if((x == 'NaN') || (y == 'NaN')){<br />
top.document.getElementById(id).style.left = x + "px";<br />
top.document.getElementById(id).style.top = y + "px";<br />
}<br />
}<br />
<div id="control" onmouseover="showPopup('control',event)" onmouseout="hidePopup('control')"
onmousemove="showPopup('control')">
Testing menu position and popup
</div>
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Michael,
Thanks for the help. Everything is working like it should now.
Thanks,
Chad Dolan
|
|
|
|
|
Hi Chad,
glad to hear.. If the message is useful for you, please vote it. Thanks.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
The window.event property only exists in Internet Explorer. Other browsers send the event object as a parameter to the method that handles the event.
---
single minded; short sighted; long gone;
|
|
|
|
|
Would you know were I could find an example of the other browsers sending the event object as a parameter?
Thanks,
Chad Dolan
|
|
|
|
|
Hoping someone can help me here, I'm uncertain if this is a VB problem or a problem with the WebBrowser control. I have a simple testharness and html page that the WebBrowser hosts.
When you run the test harness and press the ShowDlg button, the WebControl form (Form2) opens where you can happily choose values from the html dropdown in the WebBrowser using the mouse (or keyboard) - ok. However if you activate mouse hooking by pressing the Hook button first, when you then activate the WebControl form, you can no longer use the mouse to select options from the dropdown, you can open it and hover over options but if you select something with the mouse, the previous value is retained - the mouse hooking seems to interfere? Also, if the dropdown has vertical scrollbars, the mouse doesn't seem to work on that either? You can however select options from the dropdown using the keyboard.
Taking this a little further, the "Pass Msgs On" checkbox can be unchecked. This stops the call to CallNextHookEx (in Module1.bas) in the MouseProc which would mean as I understand it that the mouse messages this interrupts are no longer being passed on - however if you then goto the WebControl again, you'll see that we can now select options from the dropdown using the mouse? This to me would seem to work the opposite to how you'd logically think this would work - ie. swallowing the mouse messages you would think would cause the problems (if any), as you're not passing the messages on?
Any help/suggestions would be greatly appreciated! Hope I've explained this well enough - best use the code below to see the problem yourself.
Form1.frm:
<br />
VERSION 5.00<br />
Begin VB.Form Form1 <br />
Caption = "MouseHook"<br />
ClientHeight = 1335<br />
ClientLeft = 60<br />
ClientTop = 450<br />
ClientWidth = 3015<br />
LinkTopic = "Form1"<br />
ScaleHeight = 1335<br />
ScaleWidth = 3015<br />
StartUpPosition = 3 'Windows Default<br />
Begin VB.CheckBox Check1 <br />
Caption = "Pass Msgs On"<br />
Height = 375<br />
Left = 120<br />
TabIndex = 3<br />
Top = 720<br />
Width = 1335<br />
End<br />
Begin VB.CommandButton Command3 <br />
Caption = "ShowDlg"<br />
Height = 375<br />
Left = 1560<br />
TabIndex = 2<br />
Top = 720<br />
Width = 1335<br />
End<br />
Begin VB.CommandButton Command2 <br />
Caption = "Unhook"<br />
Height = 375<br />
Left = 1560<br />
TabIndex = 1<br />
Top = 240<br />
Width = 1335<br />
End<br />
Begin VB.CommandButton Command1 <br />
Caption = "Hook"<br />
Height = 375<br />
Left = 120<br />
TabIndex = 0<br />
Top = 240<br />
Width = 1335<br />
End<br />
End<br />
Attribute VB_Name = "Form1"<br />
Attribute VB_GlobalNameSpace = False<br />
Attribute VB_Creatable = False<br />
Attribute VB_PredeclaredId = True<br />
Attribute VB_Exposed = False<br />
Private Sub Check1_Click()<br />
If Check1.Value = vbChecked Then<br />
Module1.bCallNextHook = True<br />
Else<br />
Module1.bCallNextHook = False<br />
End If<br />
End Sub<br />
<br />
Private Sub Command1_Click()<br />
Module1.Hook<br />
SetState<br />
End Sub<br />
<br />
Private Sub Command2_Click()<br />
Module1.Unhook<br />
SetState<br />
End Sub<br />
<br />
Private Sub Command3_Click()<br />
Dim frm As New Form2<br />
frm.Show vbModal<br />
End Sub<br />
<br />
Private Sub Form_Initialize()<br />
Module1.IsHooked = False<br />
Check1.Value = vbChecked<br />
End Sub<br />
<br />
Private Sub Form_Load()<br />
SetState<br />
End Sub<br />
<br />
Private Sub Form_Terminate()<br />
Module1.Unhook<br />
End Sub<br />
<br />
Private Sub SetState()<br />
Command1.Enabled = Not Module1.IsHooked<br />
Command2.Enabled = Module1.IsHooked<br />
End Sub<br />
Form2.frm:
<br />
VERSION 5.00<br />
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"<br />
Begin VB.Form Form2 <br />
Caption = "WebControl"<br />
ClientHeight = 1425<br />
ClientLeft = 60<br />
ClientTop = 450<br />
ClientWidth = 3570<br />
LinkTopic = "Form2"<br />
ScaleHeight = 1425<br />
ScaleWidth = 3570<br />
StartUpPosition = 3 'Windows Default<br />
Begin SHDocVwCtl.WebBrowser WebBrowser1 <br />
Height = 3135<br />
Left = 0<br />
TabIndex = 0<br />
Top = 0<br />
Width = 4695<br />
ExtentX = 8281<br />
ExtentY = 5530<br />
ViewMode = 0<br />
Offline = 0<br />
Silent = 0<br />
RegisterAsBrowser= 0<br />
RegisterAsDropTarget= 1<br />
AutoArrange = 0 'False<br />
NoClientEdge = 0 'False<br />
AlignLeft = 0 'False<br />
NoWebView = 0 'False<br />
HideFileNames = 0 'False<br />
SingleClick = 0 'False<br />
SingleSelection = 0 'False<br />
NoFolders = 0 'False<br />
Transparent = 0 'False<br />
ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"<br />
Location = ""<br />
End<br />
End<br />
Attribute VB_Name = "Form2"<br />
Attribute VB_GlobalNameSpace = False<br />
Attribute VB_Creatable = False<br />
Attribute VB_PredeclaredId = True<br />
Attribute VB_Exposed = False<br />
Private Sub Form_Load()<br />
WebBrowser1.Navigate "c:\mousehook\simpledropdown1.htm"<br />
End Sub<br />
Module1.bas
<br />
Attribute VB_Name = "Module1"<br />
Option Explicit<br />
<br />
Private Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long<br />
Private Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long<br />
Private Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, lParam As Any) As Long<br />
<br />
Public Const WH_MOUSE = 7<br />
<br />
Public IsHooked As Boolean<br />
Public bCallNextHook As Boolean<br />
Global lpPrevMouseProc As Long<br />
<br />
Public Sub Hook()<br />
If IsHooked Then<br />
MsgBox "Don't hook it twice without " & "unhooking, or you will be unable to unhook it."<br />
Else<br />
lpPrevMouseProc = SetWindowsHookEx(WH_MOUSE, AddressOf Module1.MouseProc, 0, App.ThreadID)<br />
IsHooked = True<br />
End If<br />
End Sub<br />
<br />
Public Sub Unhook()<br />
Dim temp As Long<br />
If IsHooked Then<br />
temp = UnhookWindowsHookEx(lpPrevMouseProc)<br />
IsHooked = False<br />
End If<br />
End Sub<br />
<br />
Function MouseProc(ByVal uCode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long<br />
Debug.Print "Message: " & uCode<br />
If bCallNextHook Then<br />
MouseProc = CallNextHookEx(lpPrevMouseProc, uCode, wParam, lParam)<br />
End If<br />
End Function<br />
simpledropdown1.htm: (c:\mousehook\simpledropdown1.htm)
<br />
<HTML><br />
<HEAD><br />
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><br />
</HEAD><br />
<BODY><br />
<P><br />
<SELECT id=select1 style="WIDTH: 147px"> <br />
<OPTION selected></OPTION><br />
<OPTION>1</OPTION><br />
<OPTION>2</OPTION><br />
<OPTION>3</OPTION><br />
<OPTION>4</OPTION><br />
</SELECT><br />
</P><br />
</BODY><br />
</HTML><br />
-- modified at 23:58 Wednesday 22nd August, 2007
|
|
|
|
|
Hi,
Can you plase give me a hint .... I want to load an image (jpeg) from the server generated by an aspx without postback, so i created an XMLHTTPRequest oject, I run the aspx, the responeXML is an XML and the image is base64 encoded inside a node... (i can see the string in my page) how can i display it ?
So i need someking of javascipt to decode it ? Am I on the right track ?
Thank you!
iulian.
|
|
|
|
|
No, I don't think so. I think the right approach here is to use AJAX to send down the path to the image, and then use javascript to set the properties of an IMG tag on the page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
it's ok what you say but i want the image to be dynamicaly generated based on user inputs so ... if i generate the picture and save it on disk and then send the link to the client to retrieve it i will have hundrads of useless generated pictures on the server ??
my ideea was to dynamicaly generate the picture and send it to the user (the actual data) ???
can i do that ?
thanks
|
|
|
|
|
If I understand what you are doing, problem is that you can't "write" picture into page. Pictures are NOT part of the page. What you need to do is generate your .jpg file on server, and using ajax set the image source to something like
<img src="givemepicture.aspx?picture" />
And givemepicture.aspx will write your image (probably generated using parameters passed in url) into its response. I don't know if the browser will automaticaly reload image after you change it's src with javascript.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
In my site I have used ajax technology . What I want is to prevent the user from doing anything on the page while the data is being fetched from the server using ajax. I don't want the user to be able to click a link , etc . Is it possible to do it in one place . Any Idea ??
|
|
|
|
|
while processing, you should display one overlay image on the screen..
You can check the technique which is used in open source *box[^]
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Dear all!
Now, I'm creating a activeX use MSHTML. I want to resize a cell in object table. This is my solution:
I received the mouse moving on the edge of the cell. I change the type of cursor and than Click mouse and mouse moving I change the size of cell (width or height of cell). But I can't discriminate when dose the mouse move on the vertical edge of the cell, when dose the mouse move on the horizontal edge.
Can you help me this problem.
If you have a solution that to resize the cell in the table, can you tell me!
Thanks you very much!
|
|
|
|
|
Hi!
I need some assistance.
I am using ASP.NET 2.0 Login Controls for my site and Roles are enabled. My problem is that I have a form with a dropdownlist. When a person signs on and he is in Role1 than all Role1 users must be displayed in the dropdown. If Role2 signs on then everyone from Role2 must be displayed.
Much appreciated!
Illegal Operation
Making Computer Software Talk
|
|
|
|