tgreer 189 Made Her Cry Team Colleague

Just to repeat, you do not have to do this. The selected value will already be posted, as the value of your "quantity" object.

But, if you want to move the value of one element, to another, you have to use JavaScript.

So the question is, where do I put this script, and the next question is, when does it run?

The answer to the first part is, create a JavaScript function, and place it in the head of your page:

<html>
<head>
<script type="text/javascript">
function movevalue()
{
   s = document.getElementById("quantity");
  document.getElementById("ssl_amount").value = 
  s.options[s.options.selectedIndex].value;
}
</script>
</head>
<body>
</body>
</html>

Ok, so that places the script on the page, ready to run. When will it run? In response to an EVENT. The question you have to ask is, what event should cause this to run?

I would suggest perhaps when the user changes the value of the selected option. That event, "change", is handled by adding onchange="movevalue();" to your select tag.

tgreer 189 Made Her Cry Team Colleague

There is no reason to do that, as the selected value will be posted with the form. You don't have to place it in a hidden variable.

However, in JavaScript it might look like this:

s = document.getElementById("quanity");
document.getElementById("ssl_amount").value = 
s.options[s.options.selectedIndex].value;

Untested, but should get you on the right track.

tgreer 189 Made Her Cry Team Colleague

More time than it would take to fill them slowly, one at a time, with server round-trips throw in? NO WAY.

Plus, you can likely combine your queries to return all the results in a single recordset. You don't have to use a dataset, you can can do all your queries at page load, store the results someowere (dataset, arraylist, etc.) and bind that to your dropdowns.

Trust me: you cannot do this "client-side", because a client script cannot access a database, do a query, bind to a server-control, etc.

You can either code a JavaScript "submit()" to go fetch the data via server-side code, which is slower than just doing it in the first place, or you can code something using AJAX to retrieve the data (in ASP.NET they call it a "Script CallBack"), also slower than doing it upfront.

tgreer 189 Made Her Cry Team Colleague

Well, since the goal is to PRINT 1 - 10, I give you:

PostScript

%!PS

% position constants and procs
/x 72 def 
/yPos 700 def
/y {yPos lnHeight sub dup /yPos exch def} bind def

% font constants
/fontName /Courier def
/ptSize 12 def
/lnHeight ptSize 1.2 mul def

% set the font
fontName ptSize selectfont

% for loop to paint numbers
1 1 10 { 5 string cvs x y moveto show} for

% commit page image to currentpage
showpage
tgreer 189 Made Her Cry Team Colleague

Yes, but, why? What I'm telling you is that this approach is unconventional. If you have enough information to fill the list when someone clicks it, you have enough information to fill it before it is clicked.

My suggestion is, the flaw is with your approach, not with the dropdownlist.

So again:

Why aren't you filling the dropDownList server-side, prior to delivery to the client?

You cannot fill the list client-side, unless the data to fill it is present client-side. How would the data be available? Only if you put it there, server-side. And if you can do that... why not just fill the list?

tgreer 189 Made Her Cry Team Colleague

sathiya: please use code tags when posting code.

tgreer 189 Made Her Cry Team Colleague

May I suggest the reason you're not getting replies is that you are not asking good questions.

What have you tried already? What do you know? Have you written a web service before? A windows application?

tgreer 189 Made Her Cry Team Colleague

Why aren't you filling the dropDownList server-side, prior to delivery to the client?

I go into detail about the client-server nature of ASP.NET with these articles.

tgreer 189 Made Her Cry Team Colleague

That's the way it is supposed to work. Actualy, USERS are supposed to add their own bookmarks; it's not something a site should be doing.

However, a web-search reveals this page as the very first result.

tgreer 189 Made Her Cry Team Colleague

Yes. And if not, then we add a bit of JavaScript.

But before all of that, get the page down to a few nice DIV elements.

tgreer 189 Made Her Cry Team Colleague

Please use code tags.

The CSS position attributes depend on how the elements are nested, and how the parent elements are nested, and so on up the chain.

Your page is a bit of a muddle, because you're mixing both DIV elements and TABLES, and the container hierarchy isn't very clear.

The first step is to clean up your page source. If you're going to use DIVs, then use them throughout, consistently. If you're going to use tables, then organize the entire page as a table.

When you mix-and-match, each browser will do it's best to figure out what "contains" what, and then how to apply your CSS.

You also have an incomplete DOCTYPE.

tgreer 189 Made Her Cry Team Colleague

Any Daniweb members from this area? What's it "like"? Job Market (for IT/programming/tech sector) - Real Estate (affordable ownership) - climate, etc. Are you from the area, or did you relocate there?

tgreer 189 Made Her Cry Team Colleague

Please re-read my prior message. Your "li-related" style declarations are not complete. You need to provide a complete margin AND a complete padding, for every element, or else each browser will determine its own. Your page looks fine in Firefox, but the images overlap in IE. Don't leave spacing at the whim of the browser: declare it explicitly.

tgreer 189 Made Her Cry Team Colleague

For spacing issues, make sure you always set the "margin", and the "padding", for all affected elements. Otherwise, each browser will set a default, and the default may not be what you want.

tgreer 189 Made Her Cry Team Colleague

Just read through the error messages carefully: they describe the problems and solutions. For example, your doctype expects "type" rather than "language" in your script tag: the error message says exactly that.

tgreer 189 Made Her Cry Team Colleague

The only way to do a POST is to submit a form. JavaScript can do that, with the Form.Submit() method. JavaScript can also be used to set the values of the form elements to be posted.

tgreer 189 Made Her Cry Team Colleague

I think the government should control the internet for U.S. citizens so that they make sure nothing is blocked from being viewed, or made difficult to obtain. They are obligated to do so under our freedom of speach amendment. Failure to do so is a failure to obide by the constitution.

This is not the case. The 1st amendment says that Congress cannot pass a law abridging freedom of speech.

A private/public business, such as an ISP, has no such obligation.

tgreer 189 Made Her Cry Team Colleague

I'm denied access to those images. I'm afraid I cannot add anything to my previous explanations. The scrollbar effect on the site you reference is achieved by styling that one div with "overflow: auto", as I've mentioned.

tgreer 189 Made Her Cry Team Colleague

I really didn't understand all of that. The basic trick is to organize your site into a series of DIV elements/containers.

Those that you want to display a certain size, but hold longer content, you assign the CSS "overflow: auto" style.

tgreer 189 Made Her Cry Team Colleague

Look at the "overflow" attribute.

The trick is handling how content that is bigger than its container is handled, not vice-versa.

tgreer 189 Made Her Cry Team Colleague

What? The principles of Net Neutrality? Or a Congressional Law fumbling around with our ISPs?

tgreer 189 Made Her Cry Team Colleague

Correct. You can more or less have a complete HTML file, and include PHP here and there between the PHP delimiters. However, for any of the PHP to function, you save the file with a ".php" extension.

I do that for a page on my site, where it's completely xhtml except for an RDF feed. The only php on the page is the call to the RDF parser, which outputs HTML.

However, for that one function call to work, the file is served as a PHP, not HTML.

tgreer 189 Made Her Cry Team Colleague

You cannot access elements of an array without using the square brackets, in general. That's what an array IS, a collection of elements, and you access them via the proper key, delimited by square brackets.

You can implode an array into a single delimited array, but then you'd have to do a split to get your "normal words"... but they'd be an array of substrings, so you're back to using square brackets.

I guess I don't understand the question... what would your "normal words" look like, in terms of variables?

tgreer 189 Made Her Cry Team Colleague

You don't, really. You serve a PHP file, not an HTML file. The PHP file you serve would have to call your function at some point, but you know that.

PHP, like with other web languages, runs through a "filter" before the user gets it. The filter renders the HTML by "running" the PHP.

tgreer 189 Made Her Cry Team Colleague

Please use code tags. Please don't apply unnecessary formatting to your posts. One question mark will suffice to indicate a question.

tgreer 189 Made Her Cry Team Colleague

Please, don't apply unnecessary formatting to your posts, it makes them difficult to read, and many users will simply ignore such posts.

JavaScript is client-side, and no, you cannot create files on your users' drives. The only exception is the Cookie mechanism.

tgreer 189 Made Her Cry Team Colleague

What have you tried? What specific problem are you having? Are you have problems saving, retrieving, or both? Show us the code you've written.

Have you done a web search?

http://www.google.com/search?hl=en&q=ASP.NET+upload+image+SQL+database&btnG=Google+Search

Several articles appear to deal with this topic.

tgreer 189 Made Her Cry Team Colleague

No, I don't think it will be secure. If you use the page you posted, over an insecure connection, people can see, for example, the cookie data being transmitted from the page to your browser.

tgreer 189 Made Her Cry Team Colleague

No, you should use as much security as you can.

I'm saying, though, that if the page you posted is itself accessed securely, via HTTPs, then you've taken a reasonable first step.

Access from that page to the various sites, should already be secure.

tgreer 189 Made Her Cry Team Colleague

"https" uses encryption.

tgreer 189 Made Her Cry Team Colleague

If he hosts it securely, using "https" to access it, and it links to the various services securely, using "https", then it should be reasonably secure.

tgreer 189 Made Her Cry Team Colleague

If you'd followed the link I provided, which is a Google Search, you'd see that they are ALL about "Password encryption in ASP.NET". If one of those sites (I recommend the 4GuysFromRolla article on MD5 encryption) doesn't answer your question, then we can't either.

What is "F7"? I see no reference to that in this thread or in the Google Search results.

tgreer 189 Made Her Cry Team Colleague

If however, your intent is simply to provide information for your users, then by all means go right ahead! Don't worry about PageRank and all that other nonsense: I see nothing whatsoever wrong with providing helpful, specific, relevant content for your users from a willing, ready-made source.

tgreer 189 Made Her Cry Team Colleague

:) that's not the response I wanted to generate... no discussion takes place if we ignore each other. If I genuinely persuaded you to my point of view, well... good. If I didn't, feel free to keep posting!

tgreer 189 Made Her Cry Team Colleague

Its a basic thing in my view, if they start banning one thing then it will go on and on till your freedom on the net is restricted.

But who is the "they" under question? The ISPs?

Say that you were an ultra-conservative fundamentalist, who wanted to provide an internet access service that, somehow, prevented access to all pornography-related sites. Use any other example you like: you're marketing to a certain group who want to surf the 'net without seeing "whatever".

That's a valid business model. You should have the right to start that business. A Congressional "Net Neutrality" law would violate your right to operate that business.

In any discussion of "rights", it's very important to consider all angles. Frequently, someone's "right" infringes on someone else's.

And since when was "internet access" a right or a freedom? I know I pay for mine, and I get what I pay for. If I didn't, I'd seek out another vendor.

tgreer 189 Made Her Cry Team Colleague

The FCC has already taken action, in 2004, by formulating a set of principles based on Net Neutrality, and later by making those principles part of their policy statement in 2005.

They've even levied fines against carriers who do not adhere to these principles.

Thus, there is already government regulation, of sorts, and an additional Congressional Law would be redundant and ultimately harmful, as it would no doubt provide no governance, or means of enforcement, funding for oversite/enforcement, and so on.

tgreer 189 Made Her Cry Team Colleague

You can just start another thread there; this one doesn't contain much of value, other than pointing you to Director. It also isn't clear what you're trying to create: a CD-based application, or a desktop application, a multimedia application, etc.

So my advice is we close this thread, and that you post a clearer description of your project in the appropriate forum.

tgreer 189 Made Her Cry Team Colleague

Agreed, there is nothing wrong with asking, but please ask here.

tgreer 189 Made Her Cry Team Colleague

http://www.google.com/search?hl=en&q=ASP.NET+password+encryption&btnG=Google+Search

Always start with a search engine, do some research, and then come back with specific questions if necessary. Explain what you know, what you think you know, what you've tried, and your question.

There is no reason for your post to be in red, so please refrain from unnecessary and distracting message-formatting.

"shud", "da", and "DATbse" aren't words. It's hard enough to communicate technical details, let's not confuse it even more by inventing new words to substitute for perfectly good ones.

tgreer 189 Made Her Cry Team Colleague

Reading the excellent Wiki on the topic, I was struck by the irony of this quote: ""allowing broadband carriers to control what people see and do online would fundamentally undermine the principles that have made the Internet such a success." by Tim Wu.

What's ironic is that Google, through the Adwords/Adsense technology and their hyping of the SEO industry, has dramatically altered "what people see and do online", and in my opinion, this has indeed fundamentally undermined Internet principles. Yet, Tim Wu is Google's Vice-President.

tgreer 189 Made Her Cry Team Colleague

Amen. I've always been mystified by SEO fanatacism. If we really have to go to extravagant lengths to get an engine to notice/index our site, then doesn't that highlight a flaw in the search engine?

Rather than acknowledge that and address the flaw, search engines in general and Google in particular, promote the SEO industry through a clever mix of hints, hush-hush, PageRank, and content monetization. Shame on them... they used to be a SEARCH ENGINE.

Seriously, if they can't "index" your site without elaborate SEO, SiteMap, and so on, then we all need to find a better search engine.

My site is as active with spiders as I want it to be, and I've never done any "SEO-ing".

tgreer 189 Made Her Cry Team Colleague

Perform an insert query.

"how can i save them as"... save what as what?

tgreer 189 Made Her Cry Team Colleague

The parent-child selector won't help. Don't give up on what I've posted.

For FireFox, it is entirely CSS. The script compensates for IE, using JavaScript. The script isn't that hard to understand; it's only a few lines long.

<script type="text/javascript"
function doChangeClassName()
{
    var x = document.getElementsByTagName('div');
    for (var i=0;i<x.length;i++)
    {
        x[i].childNodes[1].className = "ie_p";
    }
}
</script>

The trick is to place your headers and paragraphs into DIV elements.

The first line of the function stores all the DIV elements inside a variable, "x".

Next comes the "for loop", which steps from one DIV to the next, counting them, and storing the count in a variable, "i".

Inside the loop, we look for the second element inside the DIV. The header is the first, the first paragraph is the second. We start counting at "0", so the line x[i].childNodes[1].className = "ie_p"; means "set the class of the first paragraph in this div equal to the 'ie_p' style declaration".

That's it. Oh, and to run this script, there is this little bit at the bottom: <script>doChangeClassName();</script> It's very simple, very elegant, and introduces no noticable delay.

If you're attempting to develop CSS skills, then you shouldn't neglect Javascript skills. Both are required to be a successful web designer.

tgreer 189 Made Her Cry Team Colleague

The "conventional" method is to split the pages into separate pages, or to provide a "back to top" anchor at the end of each section. You can also investigate "frames", but they don't work well with drop-down or pop-out menus.

Dani: nope, it won't scroll. That's why sites that implement these awful scrolling menus always have a "delayed reaction". The user scrolls, and then the menu catches up. It's event-driven, and requires Javascript. I think it's tacky in the extreme. I find myself trying to read the content, and then the menu appears over it, so I scroll a bit, the menu jumps around... bad.

tgreer 189 Made Her Cry Team Colleague

Government regulations are, in principle, in the interest of public safety. Thus, in my analogy, there are government regulations about the quality of meat, meat inspection, etc.

An ISP is a business, and if they choose the questionable business practice of taking a financial interest in say, a search engine, and then deny or degrade access to competing search engines, then I simply choose a different ISP.

That's how a free-market economy works.

In fact, I WANT my ISP to block certain sites. Whenever I get a phishing email, I report it to:

1) The company they are spoofing (Paypal, Ebay)
2) The registrar for the domain hosting the spoof site
3) MY ISP, in the hopes that they'll blacklist that site to protect their customers.

So, I'm compelled to choice number 1 in your poll. I'm not sure that your poll choices are very clear... is number 3 meant to be a vote FOR or AGAINST a U.S. law enforcing Net Neutrality?

Now, in the case of locations where there may be only one ISP, then I would perhaps feel differently.

tgreer 189 Made Her Cry Team Colleague

An ISP is a business, not a U.S. Government agency, so the 1st Ammendment (freedom of... expression) doesn't apply. If an ISP blocks a website's ability to express itself to you, that is completely THEIR right, and doesn't violate anyone else's consitutional rights.

So, I'm not clear what "personal rights" you're referring to in your post.

An analogy might help: you have every right to eat hamburgers. However, a restaurant is not therefore obligated to have hamburgers on their menu. The can choose what they serve, and that violates no one's rights.

tgreer 189 Made Her Cry Team Colleague

Sure, it's possible, but I strongly recommend against it. Users find such non-intuitive features extremely disagreeable.

If you want to pursue it, research "JavaScript scrolltop" to point you in the right direction.

The issue is this: when thousands of users visit hundreds of thousands of pages, and the vast majority handle navigation a certain way, then, right or wrong, that becomes the expected way. It's called "User Expecatation" or "The User Model". Then, when your site violates that expectation, it creates irritation and annoyance: an unpleasant experience.

The only way to break through this is if your site COMPLETELY breaks the User Model - nothing is as expected, and the user is forced to "start over" and explore the new model. Some good examples are Flash sites: http://www.nike.com/nikeskateboarding/v2/main.html

So unless you want a completely avant-garde site, avoid scrolling menus!

tgreer 189 Made Her Cry Team Colleague

You're welcome.

tgreer 189 Made Her Cry Team Colleague

No, sorry. You talk about tables and urls, but show me DIV tags. These DIVs are also located in the HEAD section of your document, which is incorrect... there just is no way to answer the question "how do I change the URL of a DIV tag in the HEAD of my document", because:

1. DIV elements do not go in the HEAD section, and
2. DIV elements do not have a URL attribute.

In any case, the "setAttribute()" DOM method can be used to change/set an element's attributes, or, you can refer to an element's attributes directly, using the syntax I've already shown.

tgreer 189 Made Her Cry Team Colleague

I still don't understand the question... did my answer not make sense to you?

Since DIV elements do not have a URL attribute, I don't know what to tell you to do.