|
I wish to allow visitors to a website access a PDF file.
However, at the risk of being dim, I am not entirely sure about how to go about this.
My thinking is that I upload the file, then put a link to that file on the webpage in question.
Am I right?
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
|
Oh good!
I am not entirely dim!
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
I'm just going to assume that it was a 400MB PDF File, and he was on Dial-Up, else he would've quickly tried
-= Reelix =-
|
|
|
|
|
Hi,
May i know how can i automatically update client display based on server data....
using javascript or any other script....or AJAX...
|
|
|
|
|
That's a VERY vague question which you answered yourself. You can use javascript / AJAX to update a client display (without refreshing the entire page). Google "jquery" - it might help.
Any specific problems - please post back here.
|
|
|
|
|
To the kind attention of web programmers
I want to upload some files like CV.... to the database in a secure manner and then download the
uploaded items (using php and mysql).
Yours Truly,
Ahmad Hamid Popal Zai
|
|
|
|
|
you can use a SSL certificate to secure the data transmission. or secure ftp to a folder and just store the servers path to the file in the database and make the folder read only.
I also suggest ensuring you create a mysql user for the transaction that only has read & write permissions for that database. Make sure you use that user.
You could also encrypt the files locally - then upload.
If these are just for you, the easiest option would be to store on a server using SFTP in a folder not accessible through the web.
|
|
|
|
|
|
Back again with even less hair…
I am using an ASP page to display table fields from my SQL database, one of the fields in a table changes on a regular basis…
My question is, is it possible to make some code that will retrieve the data say every 30 secs without refreshing the page all the time, if so … HOW? Or could someone point me in the right direct for help files using asp or JavaScript please.
Thank you in advance
Regards
Ray
|
|
|
|
|
djhankypark wrote: is it possible to make some code that will retrieve the data say every 30 secs without refreshing the page
Make a AJAX call to server every 30 secs to retrieve.
This will not refresh the complete web page
|
|
|
|
|
Hi there,
Sorry so long in thanking you for your advice been working away all week.
I will start looking around for some information on your recommendations
Regards
Ray
|
|
|
|
|
Hi,
Note : after writing the message below, I suddenly thought maybe I should check for a bug related to frameset resize in IE8 : turns out there is one and this link gives a work-around : re-do your rows and cols specs in percentages :
<a href="http://www.eggheadcafe.com/conversation.aspx?messageid=34343340&threadid=34269035">http://www.eggheadcafe.com/conversation.aspx?messageid=34343340&threadid=34269035</a>[<a href="http://www.eggheadcafe.com/conversation.aspx?messageid=34343340&threadid=34269035" target="_blank" title="New Window">^</a>]
AND THE WORK-AROUND ABOVE WORKS !
I have re-written a technique I once used in VBScript in JavaScript where :
1. the master html page (index) defines a frameset which I assign an ID to, and defines a method that changes this frameset's rows or cols.
2. in the html of one of the files loaded into one of the frames in the frameset :
a. an on-click handler calls the method on the index page via window.parent.topLevelMethod()
3. I have verified the onClick handler is working, and the top level method is getting called, but the frames are not being resized.
a. I've tried using both (in the method defined in the index page) :
1. innerFNFrameSet.cols = "0,*"
2. document.getElementById("innerFNFrameSet").cols = "0,*"
3. parent.document.all("outerFNFrameSet").all("innerFNFrameSet").cols="0,*";
4. I've inspected all the frame definitions making sure the boolean "noresize" flag has not been set for any of the ones that would be changed by my assinging new values to rows or cols.
In VBScript (IE 6 or so) I had this working with no problems.
Is there some refesh I should perform on the document or the frameset ?
Appreciate any ideas.
thanks, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
modified on Monday, May 4, 2009 12:20 AM
|
|
|
|
|
I have main page a.html that use window.open to show (let say b.html) confirm dialog.
I dont use Javascript 'confirm' dialog because I need to show my table format in it.
In my b.html has confirm button and simply when clicked, it close the b.html page and refresh my a.html.
I have problem refreshing the a.html (currently open).
I need to find some kind of link identified between two html page to communicate.
Any solution or other way to solve this?
|
|
|
|
|
i know you caan do it with javascript
"window.parent" or something.
|
|
|
|
|
I am building a site that crashes in certain IE 7 and 8 configurations when IE addons are enabled.
In an ideal world we could all migrate to firefox or browsers that rendered in accordance with the W3C standards (IE8 seems alot better but isnt perfect) and all used the same javascript but unfortunately I have to accommodate the various versions of IE.
I am pretty sure that the crash is a result of the javascript and addons not getting along but it is hard to tell as the crashes only happen on certain machines (with addons enabled)
Apart from turning off the addons....what are the cures, how do I check scripts?
|
|
|
|
|
nickmaroulis wrote:
unfortunately I have to accommodate the various versions of IE.
Bane of the web dev world...
nickmaroulis wrote:
how do I check scripts?
Slowly. Open them in your IDE - use debugging tools where possible. test on as many different machines as possible to give you a better idea of what's causing the problem.
But it also might help to tell us:
which add-ons are causing the problem?
What are you coding in?
|
|
|
|
|
i have done a crystal report in aweb application, when i run it gives me a message
"the report you requested requires further information"
i typed logon information and pressed the logon button, but dont go to the report
note, the database field is not active,
please, i need help to solve the problem.
|
|
|
|
|
I have response text of table string from php (including the tr and td )and I want to display it in my table with id= "displayCart" as follow:
<table border=1 id="displayCart" ></table>
document.getElementById("displayCart").innerHTML = xhr.responseText;
It work in Firefox, but not in my IE7.
|
|
|
|
|
The last time I had the pleasure :cough: :cough: of working with HTML and TABLE elements dynamically in IE, you had to use DOM methods that created the row and cell elements individually and add them to the table and row respectively. So no, AFAIK, you have never been able to set the innerHTML of a TABLE element in IE.
|
|
|
|
|
Though I have tried before(but I am using javascript) createElement, appendChild and so on, but still doesnt work.
I heard IE need tbody and tr must be in that tbody element, but still after creating that still dont work.
That makes me not so confident to do it in php. Anyway I should give this a try, but any key/hint that I should know?
I havent thought of including thead and tfoot element as I read from some website, any simple example for this that works?
|
|
|
|
|
LordLothar wrote: I am using javascript
Yes as is this example from your first post.
LordLothar wrote: document.getElementById("displayCart").innerHTML = xhr.responseText;
But now you say this:
LordLothar wrote: That makes me not so confident to do it in php
So your post has now become confusing.
LordLothar wrote: createElement, appendChild and so on, but still doesnt work.
I heard IE need tbody and tr must be in that tbody element, but still after creating that still dont work.
Well it does work because we use here in our application so you must have done it wrong.
|
|
|
|
|
My bad, what I mean is, first I tried it in JavaScript (never mind about this).
Since I use session in php thus I will loop my array and put it in DOM. I should try this before asking, below are example I have to create DOM in php. I will change the element name as html table later.
What concern me this will also return string or xml format? to xhr.responseText, in the end I have to display this using innerHTML to tag id I have in my html page. Will that still work in IE?
ECHO (toXml($myCart));
function toXml($aCart)
{
$doc = new DomDocument('1.0');
$cart = $doc->createElement('cart');
$cart = $doc->appendChild($cart);
foreach ($aCart as $Item => $ItemName)
{
$book = $doc->createElement('book');
$book = $cart->appendChild($book);
$title = $doc->createElement('title');
$title = $book->appendChild($title);
$value = $doc->createTextNode($Item);
$value = $title->appendChild($value);
$quantity = $doc->createElement('quantity');
$quantity = $book->appendChild($quantity);
$value2 = $doc->createTextNode($ItemName);
$value2 = $quantity->appendChild($value2);
}
$strXml = $doc->saveXML();
return $strXml;
}
This is my previous post of php code that return string with element tr and td (which doesnt work in IE of course):
function toHTML($aModel,$aMaker,$aPrice,$aQty)
{
$tableString="<tr>
<th>Manufacturer</th>
<th>Model</th>
<th>Price</th>
<th>Qty</th>
<th>Total Price</th>
</tr>";
foreach ($aModel as $item)
{
$tableString .="<tr id='".$aModel[$item]."'>
<td>".$aMaker[$item]."</td>
<td>".$aModel[$item]."</td>
<td>".$aPrice[$item]."</td>
<td>".$aQty[$item]."</td>
<td>".$aPrice[$item]*$aQty[$item]."</td>
<td><a href='#' onclick='RemoveItem(\"Remove\",\"".$aModel[$item]."\")';>Remove Item</a></td>
</tr>";
}
return $tableString;
}
|
|
|
|
|
LordLothar wrote: What concern me this will also return string or xml format? to xhr.responseText, in the end I have to display this using innerHTML to tag id I have in my html page. Will that still work in IE?
Sounds like you might be starting to catch on.
led mike wrote: AFAIK, you have never been able to set the innerHTML of a TABLE element in IE.
|
|
|
|
|
The best I can think that works in both IE and Firefox is:
<table border=1><tr><td id = "td1"></td></tr></table>
Then
javascript:void(document.getElementById('td1').innerHTML='Test2')
Hope that helps.
- Reelix
-= Reelix =-
|
|
|
|