chrometweaks.org

How to connect to iPage.com with dreamweaver?

Click Here To View All Answers...


First of all How to connect to iPage.com with dreamweaver? Looking forward for any answer or 2. Another question... As usual, I have looked and looked on here for an answer to this, to no avail: How do you alter, or set to a fixed length, the field-length of the attribute drop-down menus?.

I've been through product_info.php and html_output.php, but I can't see where, if possible, to alter/modify (I'm pretty inexperienced with PHP)..

I have many drop-downs for each item in my store, and I think it looks very untidy as it is now i.e. 10 or so DD's all at different lengths.....And if I do, my customers probably do too..

I hope that all made sense. Any ideas are appreciated.....

Comments (7)

I would like to know the answer too. Anyone here know what is the answer to that question. I'll do some research in Google and get back to you if I find an answer. You should email the people at iPage as they probably could give you an answer..

Comment #1

Hi,.

From memory, you can't do it in 'straight' html, but would need to use Javascript or a CSS to define a 'style' that has a width. However, there are cross-browser' issues, that is, it won't work using those methods in all browsers. messy, eh..

The best way is to force the width by adding, as your first option a line like this:.

Not Selected.

OR maybe ....

Please choose your selection.

After finding out what the max width of any of the options will be, or just determine a width that you will keep as a standard for that form, or all forms with dropdowns..

But then, of course, people may sometimes not choose a selection. I see you use option value '74' already for 'not selected', so use a similar method to check if they have chosen an option..

Hope that helps,.

Peter..

Comment #2

Thanks for your replies, Peter, and yes I did mean fixed width!.

I've thought about using the methods you described e.g Not Selected , but as you say, I wanted to keep configuration simple i.e so people do not.

Have.

To make a selection..

I'm trying to figure out if this can be done with CSS either via external or on page style. Did you manage to find anything in your notes?.

Thanks again for your replies..

Owen..

Comment #3

Hi Owen,.

I was going to suggest simply adding a product attribute, with:.

Not Selected.

Which would force the dropdown width, but as you say, you would rather people not have to make a selection. By that, I assume, you would prefer to have the 'standard' options as the first option shown in the dropdown..

Try adding some 'non blank spaces' to your product attributes, as a test, especially try the one that is quite distinctively narrower than the other. Just try this:.

 .

Several times, after the last character in your product attributes for that dropdown, and see if it forces the width ??.

CSS, yes, that was how some people have done it. I did a Google on:.

"dropdown width".

And some of the first few posts showed how to use CSS to specify the width, in a style. When 'googling' on this, stay away from any posts to do with ASP or VBS, because most likely, they will be specific for _those_ tools, we are using a superior tool, ...PHP..

I didn't find the notes, but other Googling showed me that the use of the "DIV' command (It's called 'innerhtml' I think, from memory) would in fact be a better solution, to solve any cross browser issues. I know my notes have something about the use of "DIV", and there was some info on Sitepoint, ... hang on ......

Yep, if you check out this post:.

Http://www.sitepoint...ad.php?t=115863.

You can see , in post #7, how to use "DIV", I found it great for testing also. yes, it is ASP, but the example by 'Jofa' is all Javascript, so just try what he has given as an example. It's a great way to have client side actions dynamically changed form contenst, _without_ having to do a form reload or go back out to process any scripts on the server..

Also, reading through that post, it just 'twigged' how you can force the dropdown width..

1. Add a product attribute, like this:.

Not Selected.

2. Use either:.

<OPTION SELECTED> ...... </OPTION>.

To force what option will appear first, or ensure that the _first_ option in your select list is the option that you want people to see..

This way, the 'wide' product attribute determines that the width will be at least _that_ wide, and you can control the order of the options from the PHP code..

Hope that helps,.

Peter..

Comment #4

This is proving to be more of a nightmare than I at first thought it would.

....

I tried adding &nbsp; to pad out the width and it does work, but causes a knock on problem, namely; these 'spaces' get carried throughout the checkout process, which knocks all the widths in shopping_cart.php (for instance) out of whack..

Thank you for the link and examples, but unfortunately I can see no way of using <DIV> styles, or <option> styles as the attributes are pulled dynamically from the DB (the ASP examples were for static pages). Even if you do apply a width style attribute via stylesheet.css (which can be done - I tried it.

), this then affects all drop down menus throughout the site.

I'm thinking of going with the ' Not Selected ' idea, and possibly implementing a javascript which forces a selection before they can add an item to their basket. Is this possible? Any ideas on this?.

Thanks again Peter for all your suggestions. At least we've seemed to polarise the issue. I hope we can figure something out, because I'm sure I can't be the only one who'd like to see this done..

Owen..

Comment #5

Then it's easy. Just specify the width of drop downs in CSS. Something like:.

Select { width: 100px; }..

Comment #6

Hi,.

I did mention using CSS (see post#3 in this thread), but all the docs I have seen have mentioned problems in different browsers, that is works in one browser, won't work in another. You will definitely have continual cross-browser problems..

The way to do it with CSS is:.

<select style="WIDTH: 30px">.

<option value="1" style="WIDTH: 100px">Blue Computer case</option>.

<option value="2" style="WIDTH: 100px">Black Computer case</option>.

</select>.

But the CSS way for forcing the width is not 100% workable..

Peter..

Comment #7

Hi Owen,.

Yes, but think of what you are learning as you go..

Okay, so the use of "&nbsp;" is a no go, let's forget about that..

Yes, the post #7 was static, not data pulled from a DB, but it was to show you how to use "DIV", nothing else. Btw, if you try copying the code from post#7 and paste it into some browsers, it will hang, paste it into any editor, save it, then open in a browser, and you will see how DIV works, it's very neat..

If the same style was used for the other dropdowns, yeh, obviously..

Yes, I think adding one product attribute with the 'Not selected ' is the way to go, then you can add _that_ attribute to all the dropdowns, or at least the ones you want to be wider..

What order are the options done in now, after being pulled from the DB, what is the 'order' sql statement ? I'm thinking it would be nice to have the 'not selected' one right down the bottom of the list !!.

Or you can do this, using 'option groups':.

<td class="main">Case Option:<br><br></td>.

<td class="main">.

<select name="id[16]">.

<optgroup label=" Case Options ">.

<option value="88">Blue Dragon (Default)</option>.

<option value="51">Black Dragon</option>.

<option value="52">Silver Dragon</option>.

<option value="53">Pre-Modded Coolvolt</option>.

</optgroup>.

</select><br><br></td>.

I used this type of code when we had lots of products to select from (only ONE dropdown), and I found it very messy, it wasn't categorised, so I added product categories, sorted the products to that order first, and it is so much easier to use now..

Anyway, if you use the code like above, you actually don't need the big long".

" Not Selected ".

And the beauty of using option groups, is that the first one appears in bold, and CANNOT be selected, so we can use the first one to force the width..

Well, sounds good in theory, it shoud work..

Peter..

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.