|
merwa wrote: flase
Did you mean flash?
If yes, then you can try using ActionScript right?
merwa wrote: open a windows form
You can use window.open .
merwa wrote: center of the Screen
You can use moveTo .
-- modified at 8:34 Thursday 23rd August, 2007
|
|
|
|
|
I have noticed that on some sites you can browse your machine for path to files you want to upload to the website.
Attachments for webmail is an example. You click a button and a dialog is presented so you can search for and select the file you want to upload.
Is there a way of doing this in javascript?
What considerations need to be considered with different client operating systems (win, mac, *nix)?
|
|
|
|
|
Not really a javascript expert so can't answer all yuor quesitons definitively, but google the "javascript fileupload object" for what you want - you can certainly select the files this way, to upload them you'll need make an ajax call or similar. It ought to work across all major browsers adn OS's.
Fred
|
|
|
|
|
Thanks for the info. The javascript fileupload object is just what I need.
|
|
|
|
|
|
Thanks for the links. The stickman article is what I needed.
|
|
|
|
|
When you have a OBJECT tag that needs to be populated by a dynamic SWF. If for some chance, the SWF could not be streamed and results in a 404, then Internet Explorer seems to be eternally requesting the page as is deduced from the Status bar "Opening page ....'
Here are my questions:
1) Any defined timeouts that Internet Explorer or its ActiveX Flash objects follow?
2) Any standard mechanism to adopt in this inline. The other workaround being hit a XmlHttp and get a status code like 200 to proceed with this SWF filling.
|
|
|
|
|
hey,
i've got a webservice with one webmethod. if an exception occurs in this method, i'd like to throw it (and transport it back to the client) as a SoapException . my code looks somewhat like this:
[WebMethod]
public News[] GetLatestNews(string subscriberKey, int count, string languageName)
{
try {
}
catch (Exception ex)
{
string msg = "Internal Server Error: " + ex.Message;
string actor = HttpContext.Current.Request.Url.AbsoluteUri;
XmlNode details = BuildDetails(actor, ERR_SERVERERROR, msg);
throw new SoapException(msg, SoapException.ServerFaultCode, actor, details);
}
}
the method BuildDetails creates an XmlNode with some error information (as you can probably guess by looking at the signature).
my problem is: when i start debugging the webservice, the page i get when i invoke the method shows only the error message. without any xml around it. but i'd like to have a proper xml-return which contains all of the information i've placed into the SoapException .
what am I missing here? thanks in advance.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
I haven't used a soapException before, but often in my webservices I pass out a ref string error. If it is not blank then I got an error. That seems to have worked pretty good for me.
Ben
|
|
|
|
|
Looks at the documentation, like I said before I haven't used soapexception. It seems that the xml is only there if you put it there.
public class ThrowSoapException : WebService
{
[WebMethod]
public void myThrow(){
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
System.Xml.XmlNode node = doc.CreateNode(XmlNodeType.Element, SoapException.DetailElementName.Name, SoapException.DetailElementName.Namespace);
System.Xml.XmlNode details = doc.CreateNode(XmlNodeType.Element, "mySpecialInfo1", "http://tempuri.org/");
System.Xml.XmlNode detailsChild = doc.CreateNode(XmlNodeType.Element, "childOfSpecialInfo", "http://tempuri.org/");
details.AppendChild(detailsChild);
System.Xml.XmlNode details2 = doc.CreateNode(XmlNodeType.Element, "mySpecialInfo2", "http://tempuri.org/");
XmlAttribute attr = doc.CreateAttribute("t", "attrName", "http://tempuri.org/");
attr.Value = "attrValue";
details2.Attributes.Append(attr);
node.AppendChild(details);
node.AppendChild(details2);
SoapException se = new SoapException("Fault occurred", SoapException.ClientFaultCode,Context.Request.Url.AbsoluteUri,node);
throw se;
return; }
}
Ben
|
|
|
|
|
hey kubben,
thanks for your reply. yes, i knew this already. but i've copy-pasted your code above into my project, just in case i missed something. the same result. the only return i get is the literal: "Fault occurred".
i need to return a properly formatted soap response with a couple of details concerning the error? i was already wondering, if IE is "eating" the soap message and reducing it to this simple string. but it seems my IE settings are ok.
kind regards
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
You know looking at the overloads for the create of the soapException, I can find one that matches what you are passing in. I am thinking perhaps that is the problem? The only overloads with four parameters are:
public SoapException (
string message,
XmlQualifiedName code,
string actor,
XmlNode detail
)
public SoapException (
string message,
XmlQualifiedName code,
string actor,
Exception innerException
)
So I think that is where you need to look.
Ben
|
|
|
|
|
but the first one matches the code i've posted:
throw new SoapException(msg, SoapException.ServerFaultCode, actor, details);
regards, matthias
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
I think that SoapException.ServerFaulCode is not a XmlQualifiedName.
An XML qualified name is a namespace qualified local name in the format of namespace:localname.
Because prefixes are only required when XML is persisted or read, they are irrelevant for XmlQualifiedName objects. This class assumes that prefixes are irrelevant. It is the responsibility of the user to ensure the local name does not contain a ":".
Ben
|
|
|
|
|
Then again, I am wrong. Sorry about that.
Ben
|
|
|
|
|
|
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
|
|
|
|