Hi,
I've stumpled upon a very weird issue.
The situation is that I'm styling my own file input field, by replacing it with a text field and a button, lying below the original file input, which in turn has been given an opacity of 0. It looks great. However, when a file is selected I want to update my new "fake" text field with the file name.
This works, but only when the val() command is preceded...
User Profile
Collapse
-
OK, thanks for the reply. I've been fiddling with utf8_encode / utf8_decode back and forth and this only screws up the result i Gmail and my work mail, so I think I'll accept the fact that Hotmail will mess it up (though it only does so in list view, not when viewing the full mail.
Another thing, using these headers my mail gets stuck in quarantine at my work mail. Can you see anything my header is lacking for it to get through that... -
Problem with character encoding in mail
Hello!
I'm using a form to send a mail using PHP's mail() function. I'm having some trouble getting the character encoding just right. I need it to be in UTF-8 since i want Swedish characters allowed.
Setup is the following: the form is in UTF-8. The information is sent using an Ajax call to a php file that is encoded in UTF-8. Then, I send the mail with:
...Code:$header = ""; $header .= "Reply-To:
-
The reason is that I'm building a Joomla site and I want to automatically generate articles with code content, without the user having to manually add them.Leave a comment:
-
Nope, that's not it.
What I want to do is to put PHP code into a mySQL database, and I need to wrap it in PHP tags.
Say that my SQL attribute will need to contain <?php echo "hello";?>
The string I'm putting my PHP code in is, then, the query string that I need to put it in there.
Is it clearer? :)Leave a comment:
-
How to write PHP tags in PHP string?
Hello,
I have the situation where I need to have a string where I need to include a PHP tag. Like $myString = "this is my string <?php echo $andthisismytag ; ?>".
Constructing the string is OK without errors but then when I echo it it's empty where the PHP tag used to be. In fact it is an SQL INSERT INTO string, but I never get as far as to executing the query. The problem is in the actual string.
... -
Thanks guys, I'll try this out and let you know if I have any luck!Leave a comment:
-
hiding image until src updated
Hello,
I'm having a site where, at the page load, I'm updating the src of an image using an Ajax call, and then using the response to set the new src attribute.
The problem is, the page finishes loading before my images have been updated (or fully loaded). This means the images first show up incorrectly for some milliseconds, before changing to their correct image after the src has been updated.
I'm triggering... -
It is, put simply, exactly what i WANT to do.
But doing this messes up the size of the <li> in IE7.
I need it to be exactly 30px high, and for some reason it becomes a few pixels higher than that if I do float:right on the image?Leave a comment:
-
Problem with aligning menu text and expand image correctly
Hello,
I have an "accordion menu" where I want the structure to be like this for a menu item with "children" who are supposed to drop down when an "expand image" is clicked:
Now, for each menu item like that I want to align the span to the left,...Code:<li> <span>some text</span> <img src="the_expand_image.gif" /> </li> -
Aligning inline things vertically
Hello.
I have the following setup:
The img and the link will be displayed as inline, but I want them to align correctly vertically (the link should be on the same horizontal line as the center of the image). How do I do?Code:<div> <img /> <a>Something</a> </div>
Thanks! -
Thanks, but that doesn't help me.
I need to change the sizes of ALL images, visible or not, at the time they are loaded.
So I figured the best way would be to do it when the window has loaded.
Maybe it would be better to do it when each img has loaded, but I read something about all browsers not supporting the onload event for images?Leave a comment:
-
I'm placing dynamically sized backgrounds for images, for a shadow effect. So I need to get the height of the image (which may be random) in order to set the appropriate background height. Clearer? :)Leave a comment:
-
Thanks, your suggestion is exactly what I was doing.
However the problem is that in order to set the height for an image, I need to fetch the height of another. Those images that are not visible give me a height and width of 0. The visible images works perfectly.
Ideas?Leave a comment:
-
On-load resizing of hidden images
Hello!
I need to dynamically resize images on my site. Doing this upon window.onload works fine, but some of the images are initially set to display:none which gives them a height and width of 0.
Any ideas?
Thanks! -
While it's still not that pretty to store the data in raw PHP format, I would in your case go for a simple Ajax call from the Javascript. So if you haven't read up on Ajax, do so, it's really neat.Leave a comment:
-
Thanks Atli, just needed that nudge in the right direction :)
Very nice documentation, overall.Leave a comment:
-
need help with mysterious array initialization
Hello,
sorry for the cryptic thread subject :)
I'm examining some code at the moment and have come across the following:
Normally, if I were to init an array I would simply do:Code:$genders = array( 'F' => __('Female', true), 'M' => __('Male', true), );
...Code:$genders = array( 'F' => 'Female', 'M' => 'Male' ); -
Help with SQL query
Hello!
I have a DB setup which simplified looks like this:
PRODUCT(id, owner_id)
OWNER(id)
What I want to do is to produce a list of how many products each owner has, and then sort it in some way, all in a single query.
How do I go about this?
Thanks! -
Binary file I/O, weird problem
Hello,
I've got the following code:
...Code:wxString path = filepath; wxString newpath = filepath; fstream f(path.Append("/tests/tests.bin"), ios::in | ios::binary); fstream fnew(newpath.Append("/tests/temp.bin"), ios::out | ios::binary); Test* transferTest = new Test(); int thisSize = sizeof(Test); bool success = false; bool toBeDeleted = false; int testNo = 1;
No activity results to display
Show More
Leave a comment: