Search Results

Search found 8 results on 1 pages for 'bugkiller'.

Page 1/1 | 1 

  • How to make Asynchronous(AJAX) File Upload using iframe ?

    - by BugKiller
    Hi, I'm trying to make ajax file upload . I read that it is not possible to do that without using iframe . I wrote : <iframe id="uploadTrg" name="uploadTrg" height="0" width="0" frameborder="0" scrolling="yes"></iframe> <form id="myForm" action="file-component" method="post" enctype="multipart/form-data" target="uploadTrg"> File: <input type="file" name="file"> <input type="submit" value="Submit" id="submitBtn"/> </form> and using jquery form plugin : $('#myForm').ajaxForm({ dataType: 'json', success: function(data){ alert(data.toSource()); } }); The Result : the file is uploaded successfully and I can see the uploaded file , but a dialog box appears : since I send back a json result to display the file name + size etc .. My Question : How can I use the iFrame to be able to make " ajax file upload".

    Read the article

  • How to set the path to "context path" for uploaded files using Apache Common fileupload?

    - by BugKiller
    Hi, I'm using Apache common fileupload library with Netbeans 6.8 + Glassfish.I'm trying to change the current upload path to be in the current context path of the servlet , something like this: WEB-INF/upload so I wrote : File uploadedFile = new File("WEB-INF/upload/"+fileName); session.setAttribute("path",uploadedFile.getAbsolutePath()); item.write(uploadedFile); but I notice that the library save the uploaded files into glassfish folder , here what I get when I print the absolute path of the uploaded file : C:\Program Files\sges-v3\glassfish\domains\domain1\WEB-INF\upload\xx.rar My Question : How can I force the common fileupload to save the uploaded file in a path relative to the current servlet path , so I don't need to specify the whole path ? is this possible ?

    Read the article

  • How to use the same element name in different purposes ( in XML and DTD ) ?

    - by BugKiller
    Hi, I Want to create a DTD schema for this xml document: <root> <student> <name> <firstname>S1</firstname> <lastname>S2</lastname> </name> </student> <course> <name>CS101</name> </course> </root> as you can see , the element name in the course contains plain text ,but the element name in the student is complex type ( first-name, last-name ). The following is the DTD: <!ELEMENT root (course|student)*> <!ELEMENT student (name)> <!ELEMENT name (lastname|firstname)> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT course (name)> When I want to validate it , I get an error because the course's name has different structure then the student's name . My Question: how can I make a work-around solution for this situation without changing the name of element name using DTD not xml schema . Thanks.

    Read the article

  • I have many processes in my usecase , is this normal ?

    - by BugKiller
    Hi, I'm working now on a big system that consists of many subsystems , each subsystem depends on the other. I wrote a usecase for this system , but I note that I have many processes in my usecase ( more than 40 processes ! ) . it looks like this : Group subsystem: add Group. remove Group. join to Group. upload file. create poll. remove file. remove poll. write post/topic close post. edit post. .... Messages Centers send message view inbox read message. and so on .. each user interacts with these processes . How can I reduce the number of these processes? Is it possible to divide the usecase processes into many pages?

    Read the article

  • How to use the same element name for different purposes ( in XML and DTD ) ?

    - by BugKiller
    Hi, I Want to create a DTD schema for this xml document: <root> <student> <name> <firstname>S1</firstname> <lastname>S2</lastname> </name> </student> <course> <name>CS101</name> </course> </root> as you can see , the element name in the course contains plain text ,but the element name in the student is complex type ( first-name, last-name ). The following is the DTD: <!ELEMENT root (course|student)*> <!ELEMENT student (name)> <!ELEMENT name (lastname|firstname)> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT course (name)> When I want to validate it , I get an error because the course's name has different structure then the student's name . My Question: how can I make a work-around solution for this situation without changing the name of element name using DTD not xml schema . Thanks.

    Read the article

  • Parsing XML elements with dynamic namespace prefix in PHP

    - by BugKiller
    I have the following XML ( you can say SOAP request ) : <SOAPENV:Envelope xmlns:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:NS="http://xyz.gov/headerschema" > <SOAPENV:Header> <NS:myHeader> <NS:SourceID>223423</NS:SourceID> </NS:myHeader> </SOAPENV:Header> </SOAPENV:Envelope> I use the following code and it works fine : <?php $myRequest ='<SOAPENV:Envelope xmlns:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:NS="http://xyz.gov/headerschema" > <SOAPENV:Header> <NS:myHeader> <NS:SourceID>223423</NS:SourceID> </NS:myHeader> </SOAPENV:Header> </SOAPENV:Envelope>'; $xml = simplexml_load_string($myRequest, NULL, NULL, "http://schemas.xmlsoap.org/soap/envelope/"); $namespaces = $xml->getNameSpaces(true); $soapHeader = $xml->children($namespaces['SOAPENV'])->Header; $myHeader = $soapHeader->children($namespaces['NS'])->myHeader; echo (string)$myHeader->SourceID; ?> The Problem I know the prefix ( SOAPENV + NS ) , but the clients could change the prefix to whatever they want, so they may send me xml document that has ( MY-SOAPENV + MY-NS) prefixes. My Question How can I handle this since the namespace prefixes are not static , how can I parse it ? Thanks

    Read the article

1